Skip to content

Commit e79d337

Browse files
committed
rename
1 parent b58d84d commit e79d337

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/drill/server.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ pub async fn start_server(directory: PathBuf, today: NaiveDate) -> Fallible<()>
7878
log::debug!("Deck loaded in {duration}ms.");
7979

8080
let db_hashes: HashSet<Hash> = db.card_hashes()?;
81-
let dir_keys: HashSet<Hash> = all_cards.iter().map(|card| card.hash()).collect();
81+
let dir_hashes: HashSet<Hash> = all_cards.iter().map(|card| card.hash()).collect();
8282
// If a card is in the DB, but not in the directory, it was deleted. Therefore, remove it from the database.
83-
let to_remove: Vec<Hash> = db_keys.difference(&dir_keys).cloned().collect();
83+
let to_remove: Vec<Hash> = db_keys.difference(&dir_hashes).cloned().collect();
8484
for hash in to_remove {
8585
db.remove(&hash);
8686
}
8787
// If a card is in the directory, but not in the DB, it is new. Add it to the database.
88-
let to_add: Vec<Hash> = dir_keys.difference(&db_keys).cloned().collect();
88+
let to_add: Vec<Hash> = dir_hashes.difference(&db_keys).cloned().collect();
8989
for hash in to_add {
9090
db.insert(hash, Performance::New);
9191
}

0 commit comments

Comments
 (0)