From f6d40685477057057042fb6d5d1439ea1e6325c3 Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Mon, 24 Jun 2024 20:48:47 -0700 Subject: [PATCH] Resolve redundant_field_names clippy lint from PR 51 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)]` --- src/bytebuf.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bytebuf.rs b/src/bytebuf.rs index 135727b..8dbb769 100644 --- a/src/bytebuf.rs +++ b/src/bytebuf.rs @@ -133,7 +133,7 @@ impl BorrowMut for ByteBuf { impl From> for ByteBuf { fn from(bytes: Vec) -> Self { - ByteBuf { bytes: bytes } + ByteBuf { bytes } } }