human readable format tool prototype #479
proxy-compare.yml
on: pull_request
Proxy compare - newly generated vs present in file tree
2m 45s
Annotations
121 warnings
[clippy] framework/base/src/abi/type_description.rs#L101:
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
|
|
[clippy] framework/base/src/abi/type_description_container.rs#L28:
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
|
[clippy] framework/base/src/abi/type_description.rs#L101:
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
|
|
[clippy] framework/base/src/abi/type_description_container.rs#L28:
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
|
[clippy] data/human-readable/src/decode.rs#L22:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L119:
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
|
[clippy] data/human-readable/src/decode.rs#L127:
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
|
[clippy] data/human-readable/src/decode.rs#L136:
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
|
[clippy] data/human-readable/src/decode.rs#L148:
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
|
[clippy] data/human-readable/src/decode.rs#L215:
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
|
[clippy] data/human-readable/src/defaults.rs#L28:
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
|
[clippy] data/human-readable/src/defaults.rs#L29:
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
|
[clippy] data/human-readable/src/defaults.rs#L53:
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
|
[clippy] data/human-readable/src/defaults.rs#L59:
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
|
[clippy] data/human-readable/src/defaults.rs#L70:
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
|
[clippy] data/human-readable/src/defaults.rs#L95:
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
|
[clippy] data/human-readable/src/encode.rs#L17:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L126:
data/human-readable/src/encode.rs#L126
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<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/encode.rs#L150:
data/human-readable/src/encode.rs#L150
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<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/format.rs#L34:
data/human-readable/src/format.rs#L34
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L49:
data/human-readable/tests/single_value_tests.rs#L49
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
|
[clippy] data/human-readable/tests/struct_test.rs#L89:
data/human-readable/tests/struct_test.rs#L89
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L56:
data/human-readable/tests/single_value_tests.rs#L56
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
|
[clippy] data/human-readable/tests/struct_test.rs#L172:
data/human-readable/tests/struct_test.rs#L172
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
|
[clippy] data/human-readable/tests/struct_test.rs#L187:
data/human-readable/tests/struct_test.rs#L187
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L119:
data/human-readable/tests/single_value_tests.rs#L119
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L201:
data/human-readable/tests/single_value_tests.rs#L201
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);
|
|
[clippy] data/human-readable/src/decode.rs#L22:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L119:
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
|
[clippy] data/human-readable/src/decode.rs#L127:
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
|
[clippy] data/human-readable/src/decode.rs#L136:
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
|
[clippy] data/human-readable/src/decode.rs#L148:
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
|
[clippy] data/human-readable/src/decode.rs#L215:
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
|
[clippy] data/human-readable/src/defaults.rs#L28:
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
|
[clippy] data/human-readable/src/defaults.rs#L29:
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
|
[clippy] data/human-readable/src/defaults.rs#L53:
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
|
[clippy] data/human-readable/src/defaults.rs#L59:
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
|
[clippy] data/human-readable/src/defaults.rs#L70:
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
|
[clippy] data/human-readable/src/defaults.rs#L95:
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
|
[clippy] data/human-readable/src/encode.rs#L17:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L126:
data/human-readable/src/encode.rs#L126
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<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/encode.rs#L150:
data/human-readable/src/encode.rs#L150
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<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/format.rs#L34:
data/human-readable/src/format.rs#L34
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
|
[clippy] framework/base/src/abi/type_description.rs#L101:
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
|
|
[clippy] framework/base/src/abi/type_description_container.rs#L28:
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
|
[clippy] framework/base/src/abi/type_description.rs#L101:
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
|
|
[clippy] framework/base/src/abi/type_description_container.rs#L28:
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
|
[clippy] data/human-readable/src/decode.rs#L22:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L119:
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
|
[clippy] data/human-readable/src/decode.rs#L127:
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
|
[clippy] data/human-readable/src/decode.rs#L136:
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
|
[clippy] data/human-readable/src/decode.rs#L148:
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
|
[clippy] data/human-readable/src/decode.rs#L215:
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
|
[clippy] data/human-readable/src/defaults.rs#L28:
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
|
[clippy] data/human-readable/src/defaults.rs#L29:
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
|
[clippy] data/human-readable/src/defaults.rs#L53:
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
|
[clippy] data/human-readable/src/defaults.rs#L59:
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
|
[clippy] data/human-readable/src/defaults.rs#L70:
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
|
[clippy] data/human-readable/src/defaults.rs#L95:
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
|
[clippy] data/human-readable/src/encode.rs#L17:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L126:
data/human-readable/src/encode.rs#L126
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<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/encode.rs#L150:
data/human-readable/src/encode.rs#L150
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<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/format.rs#L34:
data/human-readable/src/format.rs#L34
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
|
[clippy] data/human-readable/tests/struct_test.rs#L89:
data/human-readable/tests/struct_test.rs#L89
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L49:
data/human-readable/tests/single_value_tests.rs#L49
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L56:
data/human-readable/tests/single_value_tests.rs#L56
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
|
[clippy] data/human-readable/tests/struct_test.rs#L172:
data/human-readable/tests/struct_test.rs#L172
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
|
[clippy] data/human-readable/tests/struct_test.rs#L187:
data/human-readable/tests/struct_test.rs#L187
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L119:
data/human-readable/tests/single_value_tests.rs#L119
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
|
[clippy] data/human-readable/tests/single_value_tests.rs#L201:
data/human-readable/tests/single_value_tests.rs#L201
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);
|
|
[clippy] data/human-readable/src/decode.rs#L22:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L34:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L35:
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
|
[clippy] data/human-readable/src/decode.rs#L119:
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
|
[clippy] data/human-readable/src/decode.rs#L127:
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
|
[clippy] data/human-readable/src/decode.rs#L136:
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
|
[clippy] data/human-readable/src/decode.rs#L148:
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
|
[clippy] data/human-readable/src/decode.rs#L215:
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
|
[clippy] data/human-readable/src/defaults.rs#L28:
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
|
[clippy] data/human-readable/src/defaults.rs#L29:
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
|
[clippy] data/human-readable/src/defaults.rs#L53:
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
|
[clippy] data/human-readable/src/defaults.rs#L59:
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
|
[clippy] data/human-readable/src/defaults.rs#L70:
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
|
[clippy] data/human-readable/src/defaults.rs#L95:
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
|
[clippy] data/human-readable/src/encode.rs#L17:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L29:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L30:
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
|
[clippy] data/human-readable/src/encode.rs#L126:
data/human-readable/src/encode.rs#L126
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<StructFieldDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[StructFieldDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/encode.rs#L150:
data/human-readable/src/encode.rs#L150
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<EnumVariantDescription>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `&[EnumVariantDescription]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
|
[clippy] data/human-readable/src/format.rs#L34:
data/human-readable/src/format.rs#L34
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
|
Proxy compare - newly generated vs present in file tree
The following actions use a deprecated Node.js version and will be forced to run on node20: actions/checkout@v3. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|
Proxy compare - newly generated vs present in file tree
Unexpected input(s) 'default', valid inputs are ['toolchain', 'target', 'components', 'cache', 'cache-workspaces', 'cache-on-failure', 'matcher', 'rustflags']
|
Proxy compare - newly generated vs present in file tree
Unexpected input(s) 'default', valid inputs are ['toolchain', 'target', 'components', 'cache', 'cache-workspaces', 'cache-on-failure', 'matcher', 'rustflags']
|