Skip to content

Commit

Permalink
chore(clippy): fix / silence clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 committed Sep 20, 2024
1 parent fd41f71 commit d93d124
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/data/import/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ use crate::download::{Download, Git, Source};
#[folder = "assets/imports"]
struct Asset;

fn git_clone(url: &String, target_path: &Utf8Path, commit: &str) -> Result<(), Error> {
fn git_clone(url: &str, target_path: &Utf8Path, commit: &str) -> Result<(), Error> {
let git_cache = crate::GIT_CACHE.get().expect("this has been set earlier");

git_cache
.cloner()
.repository_url(url.clone())
.repository_url(url.to_string())
.target_path(Some(target_path.to_path_buf()))
.commit(Some(commit.into()))
.do_clone()
Expand Down
3 changes: 1 addition & 2 deletions src/data/import/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@ impl super::Import for Local {
std::fs::create_dir_all(path_parent).with_context(|| format!("creating {path}"))?;

let link_target = if self.path.is_relative() {
let relpath = pathdiff::diff_utf8_paths(&self.path, path_parent).unwrap();
relpath
pathdiff::diff_utf8_paths(&self.path, path_parent).unwrap()
} else {
self.path.clone()
};
Expand Down
2 changes: 2 additions & 0 deletions src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ impl NoBuildReason {

enum ConfigureBuildResult {
Build(BuildInfo, NinjaRuleSnippets),
#[expect(dead_code, reason = "will use soon")]
NoBuild(NoBuildReason),
}

Expand All @@ -318,6 +319,7 @@ impl From<NoBuildReason> for ConfigureBuildResult {
// and block/allowlists allow it.
//
// TODO: configure_build() is approaching 300 LoC. it should be split up.
#[expect(clippy::too_many_arguments, reason = "yeah we know")]
fn configure_build(
binary: &Module,
contexts: &ContextBag,
Expand Down

0 comments on commit d93d124

Please sign in to comment.