From 737bd5379a37ba92ce9397c157d071de38894af8 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Thu, 20 Jun 2024 15:36:47 +0900 Subject: [PATCH] Resolve clippy::needless_pass_by_ref_mut warning ``` warning: this argument is a mutable reference, but not used mutably --> src/collada/image.rs:78:24 | 78 | fn parse_image<'a>(cx: &mut Context<'a>, node: xml::Node<'a, '_>) -> io::Result> { | ^^^^^^^^^^^^^^^^ help: consider changing to: `&Context<'a>` | = note: this is cfg-gated and may require further changes = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut = note: `-W clippy::needless-pass-by-ref-mut` implied by `-W clippy::nursery` = help: to override `-W clippy::nursery` add `#[allow(clippy::needless_pass_by_ref_mut)]` ``` --- src/collada/image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/collada/image.rs b/src/collada/image.rs index b863ae3..769a371 100644 --- a/src/collada/image.rs +++ b/src/collada/image.rs @@ -75,7 +75,7 @@ pub(super) fn parse_library_images<'a>( Ok(()) } -fn parse_image<'a>(cx: &mut Context<'a>, node: xml::Node<'a, '_>) -> io::Result> { +fn parse_image<'a>(cx: &Context<'a>, node: xml::Node<'a, '_>) -> io::Result> { debug_assert_eq!(node.tag_name().name(), "image"); let id = node.required_attribute("id")?; // let name = node.attribute("name");