Skip to content

Commit

Permalink
Fixing Clippy warnings and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
satoshi7190 committed Aug 7, 2024
1 parent 0deaa34 commit de98fb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions nusamai/src/sink/obj/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ impl DataSinkProvider for ObjSinkProvider {
fn create(&self, params: &Parameters) -> Box<dyn DataSink> {
let output_path = get_parameter_value!(params, "@output", FileSystemPath);
let transform_options = self.available_transformer();
let has_split = get_parameter_value!(params, "split-obj", Boolean).unwrap() as bool;
let has_split = get_parameter_value!(params, "split-obj", Boolean).unwrap();

Check warning on line 98 in nusamai/src/sink/obj/mod.rs

View check run for this annotation

Codecov / codecov/patch

nusamai/src/sink/obj/mod.rs#L98

Added line #L98 was not covered by tests

Box::<ObjSink>::new(ObjSink {
output_path: output_path.as_ref().unwrap().into(),
Expand Down Expand Up @@ -429,7 +429,7 @@ impl DataSink for ObjSink {
// Write OBJ file
let mut file_path = self.output_path.clone();
let has_split = self.obj_options.has_split;
let file_name = format!("{}", typename.replace(':', "_"));
let file_name = typename.replace(':', "_").to_string();
file_path.push(format!("{}_OBJ", file_name));

std::fs::create_dir_all(&file_path)?;

Check warning on line 435 in nusamai/src/sink/obj/mod.rs

View check run for this annotation

Codecov / codecov/patch

nusamai/src/sink/obj/mod.rs#L430-L435

Added lines #L430 - L435 were not covered by tests
Expand Down
2 changes: 1 addition & 1 deletion nusamai/src/sink/obj/obj_writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub fn write_obj<W: Write>(
for (i, vertex) in feature_data.iter().enumerate() {
faces_by_material
.entry(vertex.material_id)
.or_insert_with(Vec::new)
.or_default()
.push((i, vertex));
}

Check warning on line 58 in nusamai/src/sink/obj/obj_writer.rs

View check run for this annotation

Codecov / codecov/patch

nusamai/src/sink/obj/obj_writer.rs#L52-L58

Added lines #L52 - L58 were not covered by tests

Expand Down

0 comments on commit de98fb5

Please sign in to comment.