Merge pull request #184 from matklad/or_default

tiny simplification
This commit is contained in:
Aleksey Kladov 2019-07-05 17:49:28 +03:00 committed by GitHub
commit 4c09786285
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -653,7 +653,7 @@ impl<DB: Database> DependencyGraph<DB> {
self.edges.insert(from_id, to_id);
self.labels
.entry(database_key.clone())
.or_insert(SmallVec::default())
.or_default()
.push(from_id);
true
}
@ -662,7 +662,7 @@ impl<DB: Database> DependencyGraph<DB> {
let vec = self
.labels
.remove(database_key)
.unwrap_or(SmallVec::default());
.unwrap_or_default();
for from_id in &vec {
let to_id1 = self.edges.remove(from_id);