Uploaded image for project: 'Rust Driver'
  1. Rust Driver
  2. RUST-887

Use contains instead of iter for error label check

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Unknown Unknown
    • 2.0.0-beta.3
    • Affects Version/s: None
    • Component/s: None
    • None

      The contains_label method on the Error type currently uses an iterator to check for the presence of a label. The storage of labels was updated to use a HashSet in RUST-830, so we should update contains_label as well to use HashSet::contains to avoid iterating the entire set.

            Assignee:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Reporter:
            isabel.atkinson@mongodb.com Isabel Atkinson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: