Skip to content

Commit

Permalink
Resolve redundant_field_names clippy lint from PR 51
Browse files Browse the repository at this point in the history
    warning: redundant field names in struct initialization
       --> src/bytebuf.rs:136:19
        |
    136 |         ByteBuf { bytes: bytes }
        |                   ^^^^^^^^^^^^ help: replace it with: `bytes`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
        = note: `-W clippy::redundant-field-names` implied by `-W clippy::all`
        = help: to override `-W clippy::all` add `#[allow(clippy::redundant_field_names)]`
  • Loading branch information
dtolnay committed Jun 25, 2024
1 parent 90de46e commit f6d4068
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bytebuf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ impl BorrowMut<Bytes> for ByteBuf {

impl From<Vec<u8>> for ByteBuf {
fn from(bytes: Vec<u8>) -> Self {
ByteBuf { bytes: bytes }
ByteBuf { bytes }
}
}

Expand Down

0 comments on commit f6d4068

Please sign in to comment.