Skip to content

Commit

Permalink
Merge pull request #2 from RustSec/iter
Browse files Browse the repository at this point in the history
Add iterator support to AdvisoryDatabase
  • Loading branch information
tarcieri authored Feb 26, 2017
2 parents 47ddcd8 + b66b49f commit de93b1d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ use advisory::Advisory;
use error::{Error, Result};
use std::collections::HashMap;
use std::collections::hash_map::Entry::{Occupied, Vacant};
use std::collections::hash_map::Iter;
use std::io::Read;
use std::str;

Expand Down Expand Up @@ -96,6 +97,11 @@ impl AdvisoryDatabase {

result
}

/// Iterate over all of the advisories in the database
pub fn iter(&self) -> Iter<String, Advisory> {
self.advisories.iter()
}
}

#[cfg(test)]
Expand Down

0 comments on commit de93b1d

Please sign in to comment.