diff --git a/src/change_processor.rs b/src/change_processor.rs index 65748d5f..99e54606 100644 --- a/src/change_processor.rs +++ b/src/change_processor.rs @@ -73,6 +73,7 @@ pub struct ChangeProcessor { impl ChangeProcessor { /// Spin up the ChangeProcessor, connecting it to the given tree, VFS, and /// outbound message queue. + #[allow(clippy::too_many_arguments)] pub fn start( tree: Arc>, vfs: Arc, diff --git a/src/serve_session.rs b/src/serve_session.rs index 4fb2c551..227b7b40 100644 --- a/src/serve_session.rs +++ b/src/serve_session.rs @@ -111,7 +111,7 @@ pub struct ServeSession { /// Values are `(remove_count, create_write_count)` — each API write increments /// the appropriate counter, each suppressed VFS event decrements it. /// `None` for oneshot sessions. - #[allow(dead_code)] + #[allow(dead_code, clippy::type_complexity)] suppressed_paths: Option>>>, diff --git a/src/snapshot/matching.rs b/src/snapshot/matching.rs index 226eeb7f..f98d002c 100644 --- a/src/snapshot/matching.rs +++ b/src/snapshot/matching.rs @@ -825,7 +825,7 @@ mod tests { .iter() .map(|(_, face_enum)| { let mut props = shared_props.clone(); - props.push(("Face", Variant::Enum(face_enum.clone()))); + props.push(("Face", Variant::Enum(*face_enum))); make_snapshot_with_props("Texture", "Texture", props) }) .collect(); @@ -841,13 +841,13 @@ mod tests { .iter() .map(|(_, face_enum)| { let mut props = shared_props.clone(); - props.push(("Face", Variant::Enum(face_enum.clone()))); + props.push(("Face", Variant::Enum(*face_enum))); make_snapshot_with_props("Texture", "Texture", props) }) .collect(); tree_children.push(make_snapshot_with_props("Texture", "Texture", { let mut props = shared_props.clone(); - props.push(("Face", Variant::Enum(face_front.clone()))); + props.push(("Face", Variant::Enum(face_front))); props })); @@ -876,7 +876,7 @@ mod tests { None => { // Snapshot omitted Face = must match tree Face=Front (5) assert!( - variant_eq(tree_face, &Variant::Enum(face_front.clone())), + variant_eq(tree_face, &Variant::Enum(face_front)), "Snapshot without Face should match Front, got {:?}", tree_face ); @@ -913,7 +913,7 @@ mod tests { "Texture", vec![ ("Transparency", Variant::Float32(group_transparency)), - ("Face", Variant::Enum(face.clone())), + ("Face", Variant::Enum(*face)), ], )); tree_children.push(make_snapshot_with_props( @@ -921,7 +921,7 @@ mod tests { "Texture", vec![ ("Transparency", Variant::Float32(group_transparency)), - ("Face", Variant::Enum(face.clone())), + ("Face", Variant::Enum(*face)), ], )); } @@ -936,7 +936,7 @@ mod tests { "Texture", vec![ ("Transparency", Variant::Float32(group_transparency)), - ("Face", Variant::Enum(face_front.clone())), + ("Face", Variant::Enum(face_front)), ], )); } @@ -974,7 +974,7 @@ mod tests { tree_face ), None => assert!( - variant_eq(tree_face, &Variant::Enum(face_front.clone())), + variant_eq(tree_face, &Variant::Enum(face_front)), "Omitted Face should match Front, got {:?}", tree_face ), @@ -1123,11 +1123,11 @@ mod tests { let mut tree_props = vec![("Transparency", Variant::Float32(group_t))]; if let Some(face) = face_opt { - snap_props.push(("Face", Variant::Enum(face.clone()))); - tree_props.push(("Face", Variant::Enum(face.clone()))); + snap_props.push(("Face", Variant::Enum(*face))); + tree_props.push(("Face", Variant::Enum(*face))); } else { // Snapshot omits Face; tree has Front - tree_props.push(("Face", Variant::Enum(face_front.clone()))); + tree_props.push(("Face", Variant::Enum(face_front))); } snaps.push(make_snapshot_with_props("Texture", "Texture", snap_props)); @@ -1169,7 +1169,7 @@ mod tests { tree_face ), None => assert!( - variant_eq(tree_face, &Variant::Enum(face_front.clone())), + variant_eq(tree_face, &Variant::Enum(face_front)), "Omitted Face should match Front, got {:?}", tree_face ), diff --git a/src/syncback/file_names.rs b/src/syncback/file_names.rs index 71cbc8b8..0dacda52 100644 --- a/src/syncback/file_names.rs +++ b/src/syncback/file_names.rs @@ -2495,7 +2495,7 @@ mod tests { fn syncback_idempotency_same_input_same_output() { // Run the same set of instances through name_for_inst twice // and verify identical output (determinism). - let names = vec!["Alpha", "Beta/Gamma", "Beta:Gamma", "Delta", "CON"]; + let names = ["Alpha", "Beta/Gamma", "Beta:Gamma", "Delta", "CON"]; let mw = crate::snapshot_middleware::Middleware::ModuleScript; let mut dom = rbx_dom_weak::WeakDom::new(rbx_dom_weak::InstanceBuilder::new("Folder")); diff --git a/src/syncback/matching.rs b/src/syncback/matching.rs index 114d3f96..01644eeb 100644 --- a/src/syncback/matching.rs +++ b/src/syncback/matching.rs @@ -332,6 +332,7 @@ fn match_children_for_scoring( /// recursive subtree scoring. Hash fast-path: if hashes match, return 0. /// /// Mutually recursive with `match_children_for_scoring`. +#[allow(clippy::too_many_arguments)] fn compute_change_count( new_ref: Ref, old_ref: Ref, diff --git a/tests/rojo_test/serve_util.rs b/tests/rojo_test/serve_util.rs index 9577bc0a..5d7773b0 100644 --- a/tests/rojo_test/serve_util.rs +++ b/tests/rojo_test/serve_util.rs @@ -134,6 +134,7 @@ impl TestServeSession { &self.project_path } + #[allow(dead_code)] pub fn port(&self) -> usize { self.port } @@ -516,16 +517,13 @@ pub fn fresh_rebuild_read(project_path: &Path) -> NormalizedInstance { } let url = format!("http://localhost:{}/api/rojo", port); - match reqwest::blocking::get(&url) { - Ok(resp) => { - if let Ok(body) = resp.bytes() { - if let Ok(server_info) = deserialize_msgpack::(&body) { - info = Some(server_info); - break; - } + if let Ok(resp) = reqwest::blocking::get(&url) { + if let Ok(body) = resp.bytes() { + if let Ok(server_info) = deserialize_msgpack::(&body) { + info = Some(server_info); + break; } } - Err(_) => {} } let retry_time_ms = BASE_DURATION_MS * (i as f32).powf(EXP_BACKOFF_FACTOR); thread::sleep(Duration::from_millis(retry_time_ms as u64)); diff --git a/tests/tests/matching_fixtures.rs b/tests/tests/matching_fixtures.rs index b5c6f7de..817d6fcd 100644 --- a/tests/tests/matching_fixtures.rs +++ b/tests/tests/matching_fixtures.rs @@ -134,7 +134,7 @@ fn get_texture_children(dom: &WeakDom, parent: Ref) -> Vec { .iter() .filter(|&&r| { dom.get_by_ref(r) - .map_or(false, |i| i.class.as_str() == "Texture") + .is_some_and(|i| i.class.as_str() == "Texture") }) .copied() .collect() @@ -293,7 +293,7 @@ fn forward_matching_ufowave_textures() { .iter() .filter(|&&r| { tree.get_instance(r) - .map_or(false, |i| i.class_name().as_str() == "Texture") + .is_some_and(|i| i.class_name().as_str() == "Texture") }) .copied() .collect();