ipnet: remove unneeded ref to make clippy happy - #101
Merged
Merged
Conversation
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>
taspelund
force-pushed
the
trey/clippy
branch
from
September 2, 2026 17:40
52956a0 to
71250af
Compare
ahl
approved these changes
Sep 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Clippy whining: