Skip to content

Commit

Permalink
Clippy fixes and format
Browse files Browse the repository at this point in the history
  • Loading branch information
Fernthedev committed Dec 27, 2024
1 parent 2ab17d5 commit 3398ca2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/commands/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ const NINJA_DOWNLOAD: &str =
const NINJA_DOWNLOAD: &str =
"https://github.com/ninja-build/ninja/releases/latest/download/ninja-win.zip";

/// CMAKE
/// TODO: Extract tars on Linux/Mac
// CMAKE
// TODO: Extract tars on Linux/Mac

#[cfg(windows)]
const ADB_DOWNLOAD: &str =
Expand Down
2 changes: 1 addition & 1 deletion src/commands/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Opt {
// If provided, outputs the completion file for given shell
#[arg(long = "generate", value_enum)]
pub generator: Option<Shell>,

#[command(subcommand)]
pub command: Option<MainCommand>,
}
Expand Down
2 changes: 1 addition & 1 deletion src/models/package.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ impl SharedPackageConfigExtensions for SharedPackageConfig {
version_range: dep.version_range.clone(),
id: dep.id.clone(),
mod_link: shared_dep.dependency.additional_data.mod_link.clone(),
required: dep.additional_data.required
required: dep.additional_data.required,
})
.collect();

Expand Down
5 changes: 2 additions & 3 deletions src/network/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,10 @@ use std::{
};

use color_eyre::{
eyre::{bail, ensure, eyre, Context},
eyre::{ensure, Context},
Result,
};
use pbr::ProgressBar;
use reqwest::StatusCode;

use crate::models::config::get_combine_config;

Expand Down Expand Up @@ -56,7 +55,7 @@ where
match read {
// EOF
Ok(0) => break,

Ok(amount) => {
written += amount;
buffer.write_all(&temp_buf[0..amount])?;
Expand Down
2 changes: 1 addition & 1 deletion src/repository/qpackages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ impl QPMRepository {
}
}

std::fs::rename(&temp_path, &path)
std::fs::rename(&temp_path, path)
.with_context(|| format!("Unable to rename {temp_path:?} to {path:?}"))?;

Ok(())
Expand Down
4 changes: 2 additions & 2 deletions src/resolver/dependency.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ where
repo: &'b R,
}

impl<'a, 'b, R: Repository> DependencyProvider<String, VersionWrapper>
for PackageDependencyResolver<'a, 'b, R>
impl<R: Repository> DependencyProvider<String, VersionWrapper>
for PackageDependencyResolver<'_, '_, R>
{
fn choose_package_version<T: Borrow<String>, U: Borrow<Range<VersionWrapper>>>(
&self,
Expand Down

0 comments on commit 3398ca2

Please sign in to comment.