Skip to content

Commit

Permalink
Remove duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Feb 21, 2025
1 parent aaa6e33 commit adb7f9d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions crates/downloader/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ impl Downloader {
let metadata_path = cache_dir.join(METADATA_FILE);
let metadata = if metadata_path.exists() {
let file = File::open(&metadata_path)?;
RwLock::new(serde_json::from_reader(file)?)
serde_json::from_reader(file)?
} else {
RwLock::new(Metadata {
Metadata {
files: HashMap::new(),
})
}
};

Ok(Self {
cache_dir,
metadata,
metadata: RwLock::new(metadata),
client: Client::new(),
})
}
Expand Down

0 comments on commit adb7f9d

Please sign in to comment.