Skip to content

Commit

Permalink
Fix clippy lints.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitshifter committed Jan 31, 2023
1 parent 1e795c5 commit 0341e27
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions codegen/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fn is_modified(repo: &git2::Repository, output_path: &str) -> anyhow::Result<boo
match repo.status_file(Path::new(output_path)) {
Ok(status) => Ok(status.is_wt_modified()),
Err(e) if e.code() == git2::ErrorCode::NotFound => Ok(false),
Err(e) => Err(e).with_context(|| format!("git file status failed for {}", output_path)),
Err(e) => Err(e).with_context(|| format!("git file status failed for {output_path}")),
}
}

Expand Down Expand Up @@ -88,7 +88,7 @@ fn main() -> anyhow::Result<()> {
let mut output_differences = 0;
for output_path in output_paths {
if !check {
println!("generating {}", output_path);
println!("generating {output_path}");
}

let context = output_pairs.get(output_path).unwrap();
Expand Down Expand Up @@ -128,7 +128,7 @@ fn main() -> anyhow::Result<()> {
}

if stdout {
print!("{}", output_str);
print!("{output_str}");
continue;
}

Expand Down
8 changes: 4 additions & 4 deletions codegen/src/outputs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ impl ContextBuilder {
ContextBuilder::new()
.with_template("swizzle_impl.rs.tera")
.target_scalar()
.with_key_val("vec2_t", &format!("{}Vec2", prefix))
.with_key_val("vec3_t", &format!("{}Vec3", prefix))
.with_key_val("vec4_t", &format!("{}Vec4", prefix))
.with_self_t(&format!("{}Vec{}", prefix, dim))
.with_key_val("vec2_t", &format!("{prefix}Vec2"))
.with_key_val("vec3_t", &format!("{prefix}Vec3"))
.with_key_val("vec4_t", &format!("{prefix}Vec4"))
.with_self_t(&format!("{prefix}Vec{dim}"))
.with_dimension(dim)
}

Expand Down

0 comments on commit 0341e27

Please sign in to comment.