Skip to content

custom encode/decode #20

custom encode/decode

custom encode/decode #20

GitHub Actions / clippy failed Feb 27, 2024 in 1s

reviewdog [clippy] report

reported by reviewdog 🐶

Findings (4)

multi-transfer-esdt/src/lib.rs|73 col 25| warning: this if has identical blocks
--> multi-transfer-esdt/src/lib.rs:73:25
|
73 | / {
74 | | must_refund = true;
75 | | } else if call_data.endpoint.len() > u8::MAX as usize {
| |_________________________^
|
note: same as this
--> multi-transfer-esdt/src/lib.rs:75:79
|
75 | } else if call_data.endpoint.len() > u8::MAX as usize {
| ______________________________________________________^
76 | | must_refund = true;
77 | | } else if call_data.args.len() > u8::MAX as usize {
| |
^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: #[warn(clippy::if_same_then_else)] on by default
multi-transfer-esdt/src/lib.rs|75 col 79| warning: this if has identical blocks
--> multi-transfer-esdt/src/lib.rs:75:79
|
75 | } else if call_data.endpoint.len() > u8::MAX as usize {
| ______________________________________________________^
76 | | must_refund = true;
77 | | } else if call_data.args.len() > u8::MAX as usize {
| |
^
|
note: same as this
--> multi-transfer-esdt/src/lib.rs:77:75
|
77 | } else if call_data.args.len() > u8::MAX as usize {
| _________________________^
78 | | must_refund = true;
79 | | }
| |
^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
multi-transfer-esdt/src/lib.rs|73 col 25| warning: this if has identical blocks
--> multi-transfer-esdt/src/lib.rs:73:25
|
73 | / {
74 | | must_refund = true;
75 | | } else if call_data.endpoint.len() > u8::MAX as usize {
| |
^
|
note: same as this
--> multi-transfer-esdt/src/lib.rs:75:79
|
75 | } else if call_data.endpoint.len() > u8::MAX as usize {
| ______________________________________________________^
76 | | must_refund = true;
77 | | } else if call_data.args.len() > u8::MAX as usize {
| |
^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
= note: #[warn(clippy::if_same_then_else)] on by default
multi-transfer-esdt/src/lib.rs|75 col 79| warning: this if has identical blocks
--> multi-transfer-esdt/src/lib.rs:75:79
|
75 | } else if call_data.endpoint.len() > u8::MAX as usize {
| ______________________________________________________^
76 | | must_refund = true;
77 | | } else if call_data.args.len() > u8::MAX as usize {
| |
^
|
note: same as this
--> multi-transfer-esdt/src/lib.rs:77:75
|
77 | } else if call_data.args.len() > u8::MAX as usize {
| __________________________________________________^
78 | | must_refund = true;
79 | | }
| |
^
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else

Filtered Findings (0)

Annotations

Check warning on line 73 in multi-transfer-esdt/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] multi-transfer-esdt/src/lib.rs#L73

warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:73:25
   |
73 | /                         {
74 | |                             must_refund = true;
75 | |                         } else if call_data.endpoint.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
   = note: `#[warn(clippy::if_same_then_else)]` on by default
Raw output
multi-transfer-esdt/src/lib.rs:73:25:w:warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:73:25
   |
73 | /                         {
74 | |                             must_refund = true;
75 | |                         } else if call_data.endpoint.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
   = note: `#[warn(clippy::if_same_then_else)]` on by default


__END__

Check warning on line 75 in multi-transfer-esdt/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] multi-transfer-esdt/src/lib.rs#L75

warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:77:75
   |
77 |                           } else if call_data.args.len() > u8::MAX as usize {
   |  ___________________________________________________________________________^
78 | |                             must_refund = true;
79 | |                         }
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
Raw output
multi-transfer-esdt/src/lib.rs:75:79:w:warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:77:75
   |
77 |                           } else if call_data.args.len() > u8::MAX as usize {
   |  ___________________________________________________________________________^
78 | |                             must_refund = true;
79 | |                         }
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else


__END__

Check warning on line 73 in multi-transfer-esdt/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] multi-transfer-esdt/src/lib.rs#L73

warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:73:25
   |
73 | /                         {
74 | |                             must_refund = true;
75 | |                         } else if call_data.endpoint.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
   = note: `#[warn(clippy::if_same_then_else)]` on by default
Raw output
multi-transfer-esdt/src/lib.rs:73:25:w:warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:73:25
   |
73 | /                         {
74 | |                             must_refund = true;
75 | |                         } else if call_data.endpoint.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
   = note: `#[warn(clippy::if_same_then_else)]` on by default


__END__

Check warning on line 75 in multi-transfer-esdt/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

[clippy] multi-transfer-esdt/src/lib.rs#L75

warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:77:75
   |
77 |                           } else if call_data.args.len() > u8::MAX as usize {
   |  ___________________________________________________________________________^
78 | |                             must_refund = true;
79 | |                         }
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else
Raw output
multi-transfer-esdt/src/lib.rs:75:79:w:warning: this `if` has identical blocks
  --> multi-transfer-esdt/src/lib.rs:75:79
   |
75 |                           } else if call_data.endpoint.len() > u8::MAX as usize {
   |  _______________________________________________________________________________^
76 | |                             must_refund = true;
77 | |                         } else if call_data.args.len() > u8::MAX as usize {
   | |_________________________^
   |
note: same as this
  --> multi-transfer-esdt/src/lib.rs:77:75
   |
77 |                           } else if call_data.args.len() > u8::MAX as usize {
   |  ___________________________________________________________________________^
78 | |                             must_refund = true;
79 | |                         }
   | |_________________________^
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else


__END__