when typing CustomByteSlice:: (see screenshot below), the first suggestion is to also borrow the result, this is fine normally, but in this case from_bytes already returns a reference (note that the result is not wrong, but does raise a clippy warning)
a special case for these unsized newtype wrappers is that they can't be constructed with &StructName(something), so this suggestion (see screenshot below) should not be here (unless this will be supported by rust some time in the future, but then still it is not supported now so should not be suggested as it results in code that has compile errors)
when typing
CustomByteSlice::
(see screenshot below), the first suggestion is to also borrow the result, this is fine normally, but in this casefrom_bytes
already returns a reference (note that the result is not wrong, but does raise a clippy warning)a special case for these unsized newtype wrappers is that they can't be constructed with
&StructName(something)
, so this suggestion (see screenshot below) should not be here (unless this will be supported by rust some time in the future, but then still it is not supported now so should not be suggested as it results in code that has compile errors)