Skip to content

ipnet: remove unneeded ref to make clippy happy - #101

Merged
ahl merged 1 commit into
mainfrom
trey/clippy
Sep 2, 2026
Merged

ipnet: remove unneeded ref to make clippy happy#101
ahl merged 1 commit into
mainfrom
trey/clippy

Conversation

@taspelund

@taspelund taspelund commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Clippy whining:

treyaspelund@Tallon-IV ~/git/oxnet xyoy 25cc (empty) (no description)
› cargo clippy --all-targets -- --deny warnings
    Checking oxnet v0.1.7 (/Users/treyaspelund/git/oxnet)
error: redundant reference in `write!` argument
   --> src/ipnet.rs:652:28
    |
652 |         write!(f, "{}/{}", &self.addr, self.width)
    |                            ^^^^^^^^^^ help: remove the redundant `&`: `self.addr`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#useless_borrows_in_formatting
    = note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_borrows_in_formatting)]`

error: redundant reference in `write!` argument
    --> src/ipnet.rs:1056:28
     |
1056 |         write!(f, "{}/{}", &self.addr, self.width)
     |                            ^^^^^^^^^^ help: remove the redundant `&`: `self.addr`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#useless_borrows_in_formatting

error: could not compile `oxnet` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `oxnet` (lib test) due to 2 previous errors

@taspelund
taspelund requested a review from ahl September 2, 2026 17:40
@taspelund taspelund self-assigned this Sep 2, 2026
Clippy whining:
```
treyaspelund@Tallon-IV ~/git/oxnet xyoy 25cc (empty) (no description)
› cargo clippy --all-targets -- --deny warnings
    Checking oxnet v0.1.7 (/Users/treyaspelund/git/oxnet)
error: redundant reference in `write!` argument
   --> src/ipnet.rs:652:28
    |
652 |         write!(f, "{}/{}", &self.addr, self.width)
    |                            ^^^^^^^^^^ help: remove the redundant `&`: `self.addr`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#useless_borrows_in_formatting
    = note: `-D clippy::useless-borrows-in-formatting` implied by `-D warnings`
    = help: to override `-D warnings` add `#[allow(clippy::useless_borrows_in_formatting)]`

error: redundant reference in `write!` argument
    --> src/ipnet.rs:1056:28
     |
1056 |         write!(f, "{}/{}", &self.addr, self.width)
     |                            ^^^^^^^^^^ help: remove the redundant `&`: `self.addr`
     |
     = help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.98.0/index.html#useless_borrows_in_formatting

error: could not compile `oxnet` (lib) due to 2 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile `oxnet` (lib test) due to 2 previous errors
```

Signed-off-by: Trey Aspelund <trey@oxidecomputer.com>
@ahl
ahl merged commit 1a7986d into main Sep 2, 2026
14 checks passed
@ahl
ahl deleted the trey/clippy branch September 2, 2026 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants