Skip to content

added support for empty return data #2236

added support for empty return data

added support for empty return data #2236

GitHub Actions / clippy succeeded Sep 10, 2024 in 0s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (0)
Filtered Findings (4)

contracts/feature-tests/composability/interact/src/comp_interact_config.rs|52 col 9| warning: match can be simplified with .unwrap_or_default()
--> contracts/feature-tests/composability/interact/src/comp_interact_config.rs:52:9
|
52 | / match BigUint::from_str(&self.amount) {
53 | | Ok(amount) => amount,
54 | | Err() => BigUint::default(),
55 | | }
| |
^ help: replace it with: BigUint::from_str(&self.amount).unwrap_or_default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: #[warn(clippy::manual_unwrap_or_default)] on by default
contracts/feature-tests/composability/interact/src/comp_interact_config.rs|52 col 9| warning: match can be simplified with .unwrap_or_default()
--> contracts/feature-tests/composability/interact/src/comp_interact_config.rs:52:9
|
52 | / match BigUint::from_str(&self.amount) {
53 | | Ok(amount) => amount,
54 | | Err(
) => BigUint::default(),
55 | | }
| |
__^ help: replace it with: BigUint::from_str(&self.amount).unwrap_or_default()
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_unwrap_or_default
= note: #[warn(clippy::manual_unwrap_or_default)] on by default
data/codec/src/impl_for_types/impl_string.rs|129 col 50| warning: can be more succinctly written as a byte str
--> data/codec/src/impl_for_types/impl_string.rs:129:50
|
129 | check_top_encode_decode(String::from(s), &[b'a', b'b', b'c']);
| ^^^^^^^^^^^^^^^^^^^ help: try: b"abc"
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices
= note: #[warn(clippy::byte_char_slices)] on by default
data/codec/src/impl_for_types/impl_string.rs|130 col 67| warning: can be more succinctly written as a byte str
--> data/codec/src/impl_for_types/impl_string.rs:130:67
|
130 | check_top_encode_decode(String::from(s).into_boxed_str(), &[b'a', b'b', b'c']);
| ^^^^^^^^^^^^^^^^^^^ help: try: b"abc"
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#byte_char_slices