Skip to content

Commit

Permalink
Resolve clippy::needless_pass_by_ref_mut warning
Browse files Browse the repository at this point in the history
```
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<Image<'a>> {
   |                        ^^^^^^^^^^^^^^^^ 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)]`
```
  • Loading branch information
taiki-e committed Jun 20, 2024
1 parent 9266247 commit 737bd53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/collada/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Image<'a>> {
fn parse_image<'a>(cx: &Context<'a>, node: xml::Node<'a, '_>) -> io::Result<Image<'a>> {
debug_assert_eq!(node.tag_name().name(), "image");
let id = node.required_attribute("id")?;
// let name = node.attribute("name");
Expand Down

0 comments on commit 737bd53

Please sign in to comment.