Skip to content

Commit

Permalink
chore: clippy (#584)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaspar030 authored Dec 13, 2024
2 parents f24ab41 + b658b0e commit b6bf5fc
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/generate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,7 @@ impl NoBuildReason {
}
}

#[allow(clippy::large_enum_variant)]
enum ConfigureBuildResult {
Build(BuildInfo, NinjaRuleSnippets),
#[allow(dead_code)]
Expand Down
8 changes: 4 additions & 4 deletions src/model/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -240,13 +240,13 @@ fn task_handle_required_modules(
task: &Task,
modules: &IndexMap<&String, (&Module, Env, Option<IndexSet<&Module>>)>,
result: &mut IndexMap<String, Result<Task, TaskError>>,
name: &String,
name: &str,
) -> bool {
if let Some(required_modules) = &task.required_modules {
for module in required_modules {
if !modules.contains_key(module) {
result.insert(
name.clone(),
name.to_string(),
Err(TaskError::RequiredModuleMissing {
module: module.clone(),
}),
Expand All @@ -262,13 +262,13 @@ fn task_handle_required_vars(
task: &Task,
env: &im::HashMap<&String, String>,
result: &mut IndexMap<String, Result<Task, TaskError>>,
name: &String,
name: &str,
) -> bool {
if let Some(required_vars) = &task.required_vars {
for var in required_vars {
if !env.contains_key(var) {
result.insert(
name.clone(),
name.to_string(),
Err(TaskError::RequiredVarMissing { var: var.clone() }),
);
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/model/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ impl Module {
self.name.starts_with("context::")
}

pub fn add_conflicts<'a, I>(&mut self, more_conflicts: I)
pub fn add_conflicts<I>(&mut self, more_conflicts: I)
where
I: IntoIterator,
I::Item: AsRef<str>,
Expand Down
1 change: 0 additions & 1 deletion src/nested_env/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,6 @@ mod tests {
suffix: Some("S".to_string()),
start: Some("(".to_string()),
end: Some(")".to_string()),
..Default::default()
},
);

Expand Down

0 comments on commit b6bf5fc

Please sign in to comment.