Skip to content

Commit

Permalink
Fix clippy::literal_string_with_formatting_args lints (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
waywardmonkeys authored Dec 29, 2024
1 parent 8a84a4a commit 750bf07
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vello_shaders/src/compile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ impl ShaderInfo {
let suffix = ".wgsl";
if let Some(shader_name) = name.strip_suffix(suffix) {
let contents = fs::read_to_string(shader_dir.join(&file_name))
.expect("Could read shader {shader_name} contents");
.unwrap_or_else(|_| panic!("Couldn't read shader {shader_name} contents"));
if let Some(permutations) = permutation_map.get(shader_name) {
for permutation in permutations {
let mut defines = defines.clone();
Expand Down
2 changes: 1 addition & 1 deletion vello_shaders/src/compile/preprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub fn get_imports(shader_dir: &Path) -> HashMap<String, String> {
let suffix = ".wgsl";
if let Some(import_name) = name.strip_suffix(suffix) {
let contents = fs::read_to_string(imports_dir.join(&file_name))
.expect("Could read shader {import_name} contents");
.unwrap_or_else(|_| panic!("Couldn't read shader {import_name} contents"));
imports.insert(import_name.to_owned(), contents);
}
}
Expand Down

0 comments on commit 750bf07

Please sign in to comment.