Skip to content

Commit

Permalink
chore: fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
vhyrro committed Jan 21, 2024
1 parent 4e3bd52 commit 8e47f7d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rocks-bin/src/search.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub async fn search(data: Search, config: &Config) -> Result<()> {

// TODO(vhyrro): Pull in global configuration in the form of a second parameter (including which server to use for the manifest).

let manifest = manifest_from_server(config.server.to_owned(), &config).await?;
let manifest = manifest_from_server(config.server.to_owned(), config).await?;

let metadata = ManifestMetadata::new(&manifest)?;

Expand Down
2 changes: 1 addition & 1 deletion rocks-lib/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ impl Config {
pub fn only_server(self, server: Option<String>) -> Config {
Config {
only_server: server.clone(),
server: server.unwrap_or_else(|| self.server),
server: server.unwrap_or(self.server),
..self
}
}
Expand Down
3 changes: 1 addition & 2 deletions rocks-lib/src/manifest/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ impl ManifestMetadata {
}

pub async fn from_config(config: &Config) -> Result<Self> {
let manifest =
crate::manifest::manifest_from_server(config.server.clone(), &config).await?;
let manifest = crate::manifest::manifest_from_server(config.server.clone(), config).await?;

Self::new(&manifest)
}
Expand Down
2 changes: 1 addition & 1 deletion rocks-lib/src/rocks/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pub async fn download(
) -> Result<(String, String)> {
// TODO(vhyrro): Check if the rock has a `src` attribute, add better error checking. Make sure to use the latest version of a rock if the version is ommitted.

let manifest = crate::manifest::ManifestMetadata::from_config(&config).await?;
let manifest = crate::manifest::ManifestMetadata::from_config(config).await?;

if !manifest.has_rock(rock_name) {
return Err(eyre!(format!(
Expand Down

0 comments on commit 8e47f7d

Please sign in to comment.