v0.1.1
This commit is contained in:
@@ -507,6 +507,12 @@ impl LogoRegistry {
|
||||
self.logos.insert((team, sport), link);
|
||||
}
|
||||
|
||||
pub fn with_capacity(capacity: usize) -> Self {
|
||||
Self {
|
||||
logos: HashMap::with_capacity(capacity),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn find(&self, team: &str, sport: &str) -> Option<String> {
|
||||
if let Some(link) = self.logos.get(&(team.to_string(), sport.to_string())) {
|
||||
return Some(link.clone());
|
||||
|
||||
Reference in New Issue
Block a user