reviewdog [clippy] report
reported by reviewdog 🐶
Findings (59)
framework/base/src/abi/type_description.rs|101 col 9| warning: unneeded return
statement
--> framework/base/src/abi/type_description.rs:101:9
|
101 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: #[warn(clippy::needless_return)]
on by default
help: remove return
|
101 - return true;
101 + true
|
framework/base/src/abi/type_description_container.rs|28 col 45| warning: needlessly taken reference of left operand
--> framework/base/src/abi/type_description_container.rs:28:45
|
28 | .find(|(existing_type_name, _)| &existing_type_name.abi == abi_type_name)
| -----------------------^^^^^^^^^^^^^^^^^
| |
| help: use the left value directly: existing_type_name.abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: #[warn(clippy::op_ref)]
on by default
framework/base/src/abi/type_description.rs|101 col 9| warning: unneeded return
statement
--> framework/base/src/abi/type_description.rs:101:9
|
101 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: #[warn(clippy::needless_return)]
on by default
help: remove return
|
101 - return true;
101 + true
|
framework/base/src/abi/type_description_container.rs|28 col 45| warning: needlessly taken reference of left operand
--> framework/base/src/abi/type_description_container.rs:28:45
|
28 | .find(|(existing_type_name, _)| &existing_type_name.abi == abi_type_name)
| -----------------------^^^^^^^^^^^^^^^^^
| |
| help: use the left value directly: existing_type_name.abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: #[warn(clippy::op_ref)]
on by default
data/human-readable/src/decode.rs|22 col 48| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:22:48
|
22 | decode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: #[warn(clippy::needless_borrow)]
on by default
data/human-readable/src/decode.rs|34 col 60| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:60
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: variants
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|34 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:71
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|35 col 62| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:62
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: fields
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|35 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:71
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|119 col 56| warning: useless conversion to the same type: bool
--> data/human-readable/src/decode.rs:119:56
|
119 | Ok(AnyValue::SingleValue(SingleValue::Bool(bool_value.into())))
| ^^^^^^^^^^^^^^^^^ help: consider removing .into()
: bool_value
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
data/human-readable/src/decode.rs|127 col 13| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/decode.rs:127:13
|
127 | fields: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[StructFieldDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: #[warn(clippy::ptr_arg)]
on by default
data/human-readable/src/decode.rs|136 col 80| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:136:80
|
136 | let value = decode_human_readable_value(&value, &field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|148 col 15| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/decode.rs:148:15
|
148 | variants: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[EnumVariantDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/decode.rs|215 col 17| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:215:17
|
215 | &contract_abi,
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|28 col 64| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:28:64
|
28 | TypeContents::Enum(variants) => default_value_for_enum(&variants, contract_abi),
| ^^^^^^^^^ help: change this to: variants
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|29 col 66| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:29:66
|
29 | TypeContents::Struct(fields) => default_value_for_struct(&fields, contract_abi),
| ^^^^^^^ help: change this to: fields
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|53 col 13| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:53:13
|
53 | fields: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[StructFieldDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/defaults.rs|59 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:59:71
|
59 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|70 col 15| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:70:15
|
70 | variants: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[EnumVariantDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/defaults.rs|95 col 75| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:95:75
|
95 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|17 col 48| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:17:48
|
17 | encode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|29 col 60| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:60
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: variants
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|29 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:71
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|30 col 62| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:62
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: fields
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|30 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:71
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|126 col 13| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/encode.rs:126:13
|
126 | fields: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[StructFieldDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/encode.rs|150 col 15| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/encode.rs:150:15
|
150 | variants: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[EnumVariantDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/format.rs|34 col 5| warning: implementation of inherent method to_string(&self) -> String
for type format::HumanReadableValue
--> data/human-readable/src/format.rs:34:5
|
34 | / pub fn to_string(&self) -> String {
35 | | self.value.to_string()
36 | | }
| |^
|
= help: implement trait Display
for type format::HumanReadableValue
instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
= note: #[warn(clippy::inherent_to_string)]
on by default
data/human-readable/tests/struct_test.rs|89 col 23| warning: accessing first element with struct_value.0.get(0)
--> data/human-readable/tests/struct_test.rs:89:23
|
89 | let first_field = struct_value.0.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^ help: try: struct_value.0.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
= note: #[warn(clippy::get_first)]
on by default
data/human-readable/tests/single_value_tests.rs|49 col 28| warning: casting integer literal to i16
is unnecessary
--> data/human-readable/tests/single_value_tests.rs:49:28
|
49 | assert_eq!(serialized, (-1234 as i16).to_be_bytes().to_vec()); // should take only 2 bytes (top encoded)
| ^^^^^^^^^^^^^^ help: try: (-1234_i16)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: #[warn(clippy::unnecessary_cast)]
on by default
data/human-readable/tests/single_value_tests.rs|56 col 65| warning: casting integer literal to i16
is unnecessary
--> data/human-readable/tests/single_value_tests.rs:56:65
|
56 | let value = AnyValue::SingleValue(SingleValue::SignedNumber((-1234 as i16).into()));
| ^^^^^^^^^^^^^^ help: try: (-1234_i16)
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
data/human-readable/tests/struct_test.rs|172 col 23| warning: accessing first element with struct_value.0.get(0)
--> data/human-readable/tests/struct_test.rs:172:23
|
172 | let first_field = struct_value.0.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^ help: try: struct_value.0.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
data/human-readable/tests/struct_test.rs|187 col 30| warning: accessing first element with nested_struct_value.0.get(0)
--> data/human-readable/tests/struct_test.rs:187:30
|
187 | let first_nested_field = nested_struct_value.0.get(0).unwrap();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: nested_struct_value.0.first()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_first
data/human-readable/tests/single_value_tests.rs|119 col 57| warning: useless conversion to the same type: bool
--> data/human-readable/tests/single_value_tests.rs:119:57
|
119 | let value = AnyValue::SingleValue(SingleValue::Bool(true.into()));
| ^^^^^^^^^^^ help: consider removing .into()
: true
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
data/human-readable/tests/single_value_tests.rs|201 col 5| warning: used assert_eq!
with a literal bool
--> data/human-readable/tests/single_value_tests.rs:201:5
|
201 | assert_eq!(default_bool, false);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bool_assert_comparison
= note: #[warn(clippy::bool_assert_comparison)]
on by default
help: replace it with assert!(..)
|
201 - assert_eq!(default_bool, false);
201 + assert!(!default_bool);
|
data/human-readable/src/decode.rs|22 col 48| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:22:48
|
22 | decode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: #[warn(clippy::needless_borrow)]
on by default
data/human-readable/src/decode.rs|34 col 60| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:60
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: variants
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|34 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:71
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|35 col 62| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:62
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: fields
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|35 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:71
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|119 col 56| warning: useless conversion to the same type: bool
--> data/human-readable/src/decode.rs:119:56
|
119 | Ok(AnyValue::SingleValue(SingleValue::Bool(bool_value.into())))
| ^^^^^^^^^^^^^^^^^ help: consider removing .into()
: bool_value
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: #[warn(clippy::useless_conversion)]
on by default
data/human-readable/src/decode.rs|127 col 13| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/decode.rs:127:13
|
127 | fields: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[StructFieldDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: #[warn(clippy::ptr_arg)]
on by default
data/human-readable/src/decode.rs|136 col 80| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:136:80
|
136 | let value = decode_human_readable_value(&value, &field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/decode.rs|148 col 15| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/decode.rs:148:15
|
148 | variants: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[EnumVariantDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/decode.rs|215 col 17| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:215:17
|
215 | &contract_abi,
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|28 col 64| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:28:64
|
28 | TypeContents::Enum(variants) => default_value_for_enum(&variants, contract_abi),
| ^^^^^^^^^ help: change this to: variants
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|29 col 66| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:29:66
|
29 | TypeContents::Struct(fields) => default_value_for_struct(&fields, contract_abi),
| ^^^^^^^ help: change this to: fields
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|53 col 13| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:53:13
|
53 | fields: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[StructFieldDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/defaults.rs|59 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:59:71
|
59 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/defaults.rs|70 col 15| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:70:15
|
70 | variants: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[EnumVariantDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/defaults.rs|95 col 75| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:95:75
|
95 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|17 col 48| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:17:48
|
17 | encode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|29 col 60| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:60
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: variants
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|29 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:71
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|30 col 62| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:62
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: fields
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|30 col 71| warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:71
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: contract_abi
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
data/human-readable/src/encode.rs|126 col 13| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/encode.rs:126:13
|
126 | fields: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[StructFieldDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/encode.rs|150 col 15| warning: writing &Vec
instead of &[_]
involves a new object where a slice will do
--> data/human-readable/src/encode.rs:150:15
|
150 | variants: &Vec,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: &[EnumVariantDescription]
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
data/human-readable/src/format.rs|34 col 5| warning: implementation of inherent method to_string(&self) -> String
for type format::HumanReadableValue
--> data/human-readable/src/format.rs:34:5
|
34 | / pub fn to_string(&self) -> String {
35 | | self.value.to_string()
36 | | }
| |^
|
= help: implement trait Display
for type format::HumanReadableValue
instead
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inherent_to_string
= note: #[warn(clippy::inherent_to_string)]
on by default
Filtered Findings (0)
Annotations
Check warning on line 101 in framework/base/src/abi/type_description.rs
github-actions / clippy
[clippy] framework/base/src/abi/type_description.rs#L101
warning: unneeded `return` statement
--> framework/base/src/abi/type_description.rs:101:9
|
101 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
101 - return true;
101 + true
|
Raw output
framework/base/src/abi/type_description.rs:101:9:w:warning: unneeded `return` statement
--> framework/base/src/abi/type_description.rs:101:9
|
101 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
101 - return true;
101 + true
|
__END__
Check warning on line 28 in framework/base/src/abi/type_description_container.rs
github-actions / clippy
[clippy] framework/base/src/abi/type_description_container.rs#L28
warning: needlessly taken reference of left operand
--> framework/base/src/abi/type_description_container.rs:28:45
|
28 | .find(|(existing_type_name, _)| &existing_type_name.abi == abi_type_name)
| -----------------------^^^^^^^^^^^^^^^^^
| |
| help: use the left value directly: `existing_type_name.abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
Raw output
framework/base/src/abi/type_description_container.rs:28:45:w:warning: needlessly taken reference of left operand
--> framework/base/src/abi/type_description_container.rs:28:45
|
28 | .find(|(existing_type_name, _)| &existing_type_name.abi == abi_type_name)
| -----------------------^^^^^^^^^^^^^^^^^
| |
| help: use the left value directly: `existing_type_name.abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
__END__
Check warning on line 101 in framework/base/src/abi/type_description.rs
github-actions / clippy
[clippy] framework/base/src/abi/type_description.rs#L101
warning: unneeded `return` statement
--> framework/base/src/abi/type_description.rs:101:9
|
101 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
101 - return true;
101 + true
|
Raw output
framework/base/src/abi/type_description.rs:101:9:w:warning: unneeded `return` statement
--> framework/base/src/abi/type_description.rs:101:9
|
101 | return true;
| ^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
101 - return true;
101 + true
|
__END__
Check warning on line 28 in framework/base/src/abi/type_description_container.rs
github-actions / clippy
[clippy] framework/base/src/abi/type_description_container.rs#L28
warning: needlessly taken reference of left operand
--> framework/base/src/abi/type_description_container.rs:28:45
|
28 | .find(|(existing_type_name, _)| &existing_type_name.abi == abi_type_name)
| -----------------------^^^^^^^^^^^^^^^^^
| |
| help: use the left value directly: `existing_type_name.abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
Raw output
framework/base/src/abi/type_description_container.rs:28:45:w:warning: needlessly taken reference of left operand
--> framework/base/src/abi/type_description_container.rs:28:45
|
28 | .find(|(existing_type_name, _)| &existing_type_name.abi == abi_type_name)
| -----------------------^^^^^^^^^^^^^^^^^
| |
| help: use the left value directly: `existing_type_name.abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref
= note: `#[warn(clippy::op_ref)]` on by default
__END__
Check warning on line 22 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L22
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:22:48
|
22 | decode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
Raw output
data/human-readable/src/decode.rs:22:48:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:22:48
|
22 | decode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
__END__
Check warning on line 34 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L34
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:60
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: `variants`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/decode.rs:34:60:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:60
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: `variants`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 34 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L34
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:71
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/decode.rs:34:71:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:34:71
|
34 | TypeContents::Enum(variants) => decode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 35 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L35
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:62
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/decode.rs:35:62:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:62
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 35 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L35
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:71
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/decode.rs:35:71:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:35:71
|
35 | TypeContents::Struct(fields) => decode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 119 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L119
warning: useless conversion to the same type: `bool`
--> data/human-readable/src/decode.rs:119:56
|
119 | Ok(AnyValue::SingleValue(SingleValue::Bool(bool_value.into())))
| ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `bool_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
Raw output
data/human-readable/src/decode.rs:119:56:w:warning: useless conversion to the same type: `bool`
--> data/human-readable/src/decode.rs:119:56
|
119 | Ok(AnyValue::SingleValue(SingleValue::Bool(bool_value.into())))
| ^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `bool_value`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
__END__
Check warning on line 127 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L127
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/decode.rs:127:13
|
127 | fields: &Vec<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
Raw output
data/human-readable/src/decode.rs:127:13:w:warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/decode.rs:127:13
|
127 | fields: &Vec<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `#[warn(clippy::ptr_arg)]` on by default
__END__
Check warning on line 136 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L136
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:136:80
|
136 | let value = decode_human_readable_value(&value, &field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/decode.rs:136:80:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:136:80
|
136 | let value = decode_human_readable_value(&value, &field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 148 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L148
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/decode.rs:148:15
|
148 | variants: &Vec<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
Raw output
data/human-readable/src/decode.rs:148:15:w:warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/decode.rs:148:15
|
148 | variants: &Vec<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
__END__
Check warning on line 215 in data/human-readable/src/decode.rs
github-actions / clippy
[clippy] data/human-readable/src/decode.rs#L215
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:215:17
|
215 | &contract_abi,
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/decode.rs:215:17:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/decode.rs:215:17
|
215 | &contract_abi,
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 28 in data/human-readable/src/defaults.rs
github-actions / clippy
[clippy] data/human-readable/src/defaults.rs#L28
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:28:64
|
28 | TypeContents::Enum(variants) => default_value_for_enum(&variants, contract_abi),
| ^^^^^^^^^ help: change this to: `variants`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/defaults.rs:28:64:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:28:64
|
28 | TypeContents::Enum(variants) => default_value_for_enum(&variants, contract_abi),
| ^^^^^^^^^ help: change this to: `variants`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 29 in data/human-readable/src/defaults.rs
github-actions / clippy
[clippy] data/human-readable/src/defaults.rs#L29
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:29:66
|
29 | TypeContents::Struct(fields) => default_value_for_struct(&fields, contract_abi),
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/defaults.rs:29:66:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:29:66
|
29 | TypeContents::Struct(fields) => default_value_for_struct(&fields, contract_abi),
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 53 in data/human-readable/src/defaults.rs
github-actions / clippy
[clippy] data/human-readable/src/defaults.rs#L53
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:53:13
|
53 | fields: &Vec<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
Raw output
data/human-readable/src/defaults.rs:53:13:w:warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:53:13
|
53 | fields: &Vec<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
__END__
Check warning on line 59 in data/human-readable/src/defaults.rs
github-actions / clippy
[clippy] data/human-readable/src/defaults.rs#L59
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:59:71
|
59 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/defaults.rs:59:71:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:59:71
|
59 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 70 in data/human-readable/src/defaults.rs
github-actions / clippy
[clippy] data/human-readable/src/defaults.rs#L70
warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:70:15
|
70 | variants: &Vec<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
Raw output
data/human-readable/src/defaults.rs:70:15:w:warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> data/human-readable/src/defaults.rs:70:15
|
70 | variants: &Vec<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
__END__
Check warning on line 95 in data/human-readable/src/defaults.rs
github-actions / clippy
[clippy] data/human-readable/src/defaults.rs#L95
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:95:75
|
95 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/defaults.rs:95:75:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/defaults.rs:95:75
|
95 | let value = default_value_for_abi_type(&field.field_type.abi, &contract_abi)?;
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 17 in data/human-readable/src/encode.rs
github-actions / clippy
[clippy] data/human-readable/src/encode.rs#L17
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:17:48
|
17 | encode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/encode.rs:17:48:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:17:48
|
17 | encode_any_value(input, &type_description, &contract_abi)
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 29 in data/human-readable/src/encode.rs
github-actions / clippy
[clippy] data/human-readable/src/encode.rs#L29
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:60
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: `variants`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/encode.rs:29:60:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:60
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^ help: change this to: `variants`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 29 in data/human-readable/src/encode.rs
github-actions / clippy
[clippy] data/human-readable/src/encode.rs#L29
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:71
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/encode.rs:29:71:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:29:71
|
29 | TypeContents::Enum(variants) => encode_enum(input, &variants, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 30 in data/human-readable/src/encode.rs
github-actions / clippy
[clippy] data/human-readable/src/encode.rs#L30
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:62
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/encode.rs:30:62:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:62
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^ help: change this to: `fields`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__
Check warning on line 30 in data/human-readable/src/encode.rs
github-actions / clippy
[clippy] data/human-readable/src/encode.rs#L30
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:71
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Raw output
data/human-readable/src/encode.rs:30:71:w:warning: this expression creates a reference which is immediately dereferenced by the compiler
--> data/human-readable/src/encode.rs:30:71
|
30 | TypeContents::Struct(fields) => encode_struct(input, &fields, &contract_abi),
| ^^^^^^^^^^^^^ help: change this to: `contract_abi`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
__END__