Skip to content

Bump to 0.2.1

Bump to 0.2.1 #33

Triggered via push January 5, 2024 16:42
Status Success
Total duration 2m 53s
Artifacts

build.yml

on: push
Matrix: build
Matrix: test
Fit to window
Zoom out
Zoom in

Annotations

189 warnings
very complex type used. Consider factoring parts into `type` definitions: scanflow-cli/src/main.rs#L81
warning: very complex type used. Consider factoring parts into `type` definitions --> scanflow-cli/src/main.rs:81:6 | 81 | ) -> Result<( | ______^ 82 | | Either<OsChain, ConnectorChain>, 83 | | Option<&str>, 84 | | bool, 85 | | log::Level, 86 | | )> { | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: scanflow-cli/src/main.rs#L38
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow-cli/src/main.rs:38:51 | 38 | let process = os.into_process_by_name(&target)?; | ^^^^^^^ help: change this to: `target` | = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L725
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:725:13 | 725 | let b = TYPES | _____________^ 726 | | .iter() 727 | | .filter(|Type(name, _, _, _)| name == &typename) 728 | | .next()? | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 725 ~ let b = TYPES 726 ~ .iter().find(|Type(name, _, _, _)| name == &typename)? |
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L721
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:721:41 | 721 | let mut words = input.splitn(2, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
very complex type used. Consider factoring parts into `type` definitions: scanflow-cli/src/main.rs#L81
warning: very complex type used. Consider factoring parts into `type` definitions --> scanflow-cli/src/main.rs:81:6 | 81 | ) -> Result<( | ______^ 82 | | Either<OsChain, ConnectorChain>, 83 | | Option<&str>, 84 | | bool, 85 | | log::Level, 86 | | )> { | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L710
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:710:5 | 710 | / TYPES 711 | | .iter() 712 | | .filter(|Type(name, _, _, _)| name == &typename) 713 | | .next() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 710 ~ TYPES 711 + .iter().find(|Type(name, _, _, _)| name == &typename) |
this expression creates a reference which is immediately dereferenced by the compiler: scanflow-cli/src/main.rs#L38
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow-cli/src/main.rs:38:51 | 38 | let process = os.into_process_by_name(&target)?; | ^^^^^^^ help: change this to: `target` | = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L725
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:725:13 | 725 | let b = TYPES | _____________^ 726 | | .iter() 727 | | .filter(|Type(name, _, _, _)| name == &typename) 728 | | .next()? | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 725 ~ let b = TYPES 726 ~ .iter().find(|Type(name, _, _, _)| name == &typename)? |
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L721
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:721:41 | 721 | let mut words = input.splitn(2, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L710
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:710:5 | 710 | / TYPES 711 | | .iter() 712 | | .filter(|Type(name, _, _, _)| name == &typename) 713 | | .next() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 710 ~ TYPES 711 + .iter().find(|Type(name, _, _, _)| name == &typename) |
useless use of `format!`: scanflow-cli/src/cli.rs#L625
warning: useless use of `format!` --> scanflow-cli/src/cli.rs:625:18 | 625 | Some(format!("{}", String::from_utf16_lossy(&vec))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `String::from_utf16_lossy(&vec).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
`to_string` applied to a type that implements `Display` in `println!` args: scanflow-cli/src/cli.rs#L590
warning: `to_string` applied to a type that implements `Display` in `println!` args --> scanflow-cli/src/cli.rs:590:57 | 590 | println!("Error reading line: {}", e.to_string()); | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L555
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:555:36 | 555 | let mut words = args.splitn(3, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
useless use of `format!`: scanflow-cli/src/cli.rs#L625
warning: useless use of `format!` --> scanflow-cli/src/cli.rs:625:18 | 625 | Some(format!("{}", String::from_utf16_lossy(&vec))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `String::from_utf16_lossy(&vec).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
`to_string` applied to a type that implements `Display` in `println!` args: scanflow-cli/src/cli.rs#L590
warning: `to_string` applied to a type that implements `Display` in `println!` args --> scanflow-cli/src/cli.rs:590:57 | 590 | println!("Error reading line: {}", e.to_string()); | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L555
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:555:36 | 555 | let mut words = args.splitn(3, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: scanflow-cli/src/cli.rs#L397
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> scanflow-cli/src/cli.rs:397:16 | 397 | .chain(proc_cmds().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `proc_cmds()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:523:12 = 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
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: scanflow-cli/src/cli.rs#L397
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> scanflow-cli/src/cli.rs:397:16 | 397 | .chain(proc_cmds().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `proc_cmds()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:523:12 = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L168
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:168:52 | 168 | if let Some(Type(_, size, _, _)) = TYPES | ____________________________________________________^ 169 | | .iter() 170 | | .filter(|Type(name, _, _, _)| name == &arg) 171 | | .next() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next = note: `#[warn(clippy::filter_next)]` on by default help: try | 168 ~ if let Some(Type(_, size, _, _)) = TYPES 169 + .iter().find(|Type(name, _, _, _)| name == &arg) |
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L168
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:168:52 | 168 | if let Some(Type(_, size, _, _)) = TYPES | ____________________________________________________^ 169 | | .iter() 170 | | .filter(|Type(name, _, _, _)| name == &arg) 171 | | .next() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next = note: `#[warn(clippy::filter_next)]` on by default help: try | 168 ~ if let Some(Type(_, size, _, _)) = TYPES 169 + .iter().find(|Type(name, _, _, _)| name == &arg) |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L494
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:494:24 | 494 | } else { | ________________________^ 495 | | if let Some((buf, t)) = parse_input(line, &ctx.typename) { 496 | | ctx.buf_len = buf.len(); 497 | | ctx.value_scanner ... | 503 | | } 504 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 494 ~ } else if let Some((buf, t)) = parse_input(line, &ctx.typename) { 495 + ctx.buf_len = buf.len(); 496 + ctx.value_scanner 497 + .scan_for_2(&mut ctx.memory, ctx.funcs.maps, &buf)?; 498 + print_matches(&ctx.value_scanner, &mut ctx.memory, ctx.buf_len, &t)?; 499 + ctx.typename = Some(t); 500 + } else { 501 + println!("Invalid input! Use `help` for command reference."); 502 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L494
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:494:24 | 494 | } else { | ________________________^ 495 | | if let Some((buf, t)) = parse_input(line, &ctx.typename) { 496 | | ctx.buf_len = buf.len(); 497 | | ctx.value_scanner ... | 503 | | } 504 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 494 ~ } else if let Some((buf, t)) = parse_input(line, &ctx.typename) { 495 + ctx.buf_len = buf.len(); 496 + ctx.value_scanner 497 + .scan_for_2(&mut ctx.memory, ctx.funcs.maps, &buf)?; 498 + print_matches(&ctx.value_scanner, &mut ctx.memory, ctx.buf_len, &t)?; 499 + ctx.typename = Some(t); 500 + } else { 501 + println!("Invalid input! Use `help` for command reference."); 502 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L467
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:467:24 | 467 | } else { | ________________________^ 468 | | if let Some(cmd) = cmds 469 | | .iter_mut() 470 | | .find(|cmd| cmd.short == args || cmd.long == args) ... | 485 | | } 486 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 467 ~ } else if let Some(cmd) = cmds 468 + .iter_mut() 469 + .find(|cmd| cmd.short == args || cmd.long == args) 470 + { 471 + println!("{}", cmd.help); 472 + println!(); 473 + if let Some(long) = cmd.long_help { 474 + println!("{}", long); 475 + } else { 476 + println!("(no further help available)"); 477 + } 478 + } else if ["quit", "help", "q", "h"].contains(&args) { 479 + println!("Built-in command with no further help"); 480 + } else { 481 + println!( 482 + "Could not find command `{args}`. Use `help` for command reference." 483 + ); 484 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L467
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:467:24 | 467 | } else { | ________________________^ 468 | | if let Some(cmd) = cmds 469 | | .iter_mut() 470 | | .find(|cmd| cmd.short == args || cmd.long == args) ... | 485 | | } 486 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 467 ~ } else if let Some(cmd) = cmds 468 + .iter_mut() 469 + .find(|cmd| cmd.short == args || cmd.long == args) 470 + { 471 + println!("{}", cmd.help); 472 + println!(); 473 + if let Some(long) = cmd.long_help { 474 + println!("{}", long); 475 + } else { 476 + println!("(no further help available)"); 477 + } 478 + } else if ["quit", "help", "q", "h"].contains(&args) { 479 + println!("Built-in command with no further help"); 480 + } else { 481 + println!( 482 + "Could not find command `{args}`. Use `help` for command reference." 483 + ); 484 + } |
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: scanflow/src/value_scanner.rs#L112
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> scanflow/src/value_scanner.rs:112:31 | 112 | let old_matches = std::mem::replace(&mut self.matches, vec![]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.matches)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/value_scanner.rs#L72
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/value_scanner.rs:72:21 | 72 | / (0..size) 73 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/value_scanner.rs#L62
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/value_scanner.rs:62:46 | 62 | .map(|CTup3(_, size, _)| *size as u64) | ^^^^^^^^^^^^ help: try: `*size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: scanflow/src/value_scanner.rs#L112
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> scanflow/src/value_scanner.rs:112:31 | 112 | let old_matches = std::mem::replace(&mut self.matches, vec![]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.matches)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/sigmaker.rs#L207
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/sigmaker.rs:207:32 | 207 | decoder.set_ip(start_ip.to_umem() as u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `start_ip.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/value_scanner.rs#L72
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/value_scanner.rs:72:21 | 72 | / (0..size) 73 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/value_scanner.rs#L62
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/value_scanner.rs:62:46 | 62 | .map(|CTup3(_, size, _)| *size as u64) | ^^^^^^^^^^^^ help: try: `*size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/sigmaker.rs#L207
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/sigmaker.rs:207:32 | 207 | decoder.set_ip(start_ip.to_umem() as u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `start_ip.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this expression creates a reference which is immediately dereferenced by the compiler: scanflow/src/sigmaker.rs#L58
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow/src/sigmaker.rs:58:31 | 58 | Self::mask_branch(&offsets, mask, 1); | ^^^^^^^^ help: change this to: `offsets` | = 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
this expression creates a reference which is immediately dereferenced by the compiler: scanflow/src/sigmaker.rs#L58
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow/src/sigmaker.rs:58:31 | 58 | Self::mask_branch(&offsets, mask, 1); | ^^^^^^^^ help: change this to: `offsets` | = 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
this function has too many arguments (10/7): scanflow/src/pointer_map.rs#L135
warning: this function has too many arguments (10/7) --> scanflow/src/pointer_map.rs:135:5 | 135 | / fn walk_down_range( 136 | | &self, 137 | | addr: Address, 138 | | (lrange, urange): (usize, usize), ... | 145 | | (pb_start, pb_end): (f32, f32), 146 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
this function has too many arguments (10/7): scanflow/src/pointer_map.rs#L135
warning: this function has too many arguments (10/7) --> scanflow/src/pointer_map.rs:135:5 | 135 | / fn walk_down_range( 136 | | &self, 137 | | addr: Address, 138 | | (lrange, urange): (usize, usize), ... | 145 | | (pb_start, pb_end): (f32, f32), 146 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/pointer_map.rs#L61
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/pointer_map.rs:61:17 | 61 | / (0..size) 62 | | .into_iter() | |________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/pointer_map.rs#L51
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/pointer_map.rs:51:42 | 51 | .map(|CTup3(_, size, _)| size.to_umem() as u64) | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/pointer_map.rs#L61
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/pointer_map.rs:61:17 | 61 | / (0..size) 62 | | .into_iter() | |________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/pointer_map.rs#L51
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/pointer_map.rs:51:42 | 51 | .map(|CTup3(_, size, _)| size.to_umem() as u64) | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L129
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:129:28 | 129 | pb.add(m.size as u64); | ^^^^^^^^^^^^^ help: try: `m.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L129
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:129:28 | 129 | pb.add(m.size as u64); | ^^^^^^^^^^^^^ help: try: `m.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L101
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:101:52 | 101 | ... decoder.set_ip(addr as u64); | ^^^^^^^^^^^ help: try: `addr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L101
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:101:52 | 101 | ... decoder.set_ip(addr as u64); | ^^^^^^^^^^^ help: try: `addr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:48:51 | 48 | let pb = PBar::new(modules.iter().map(|m| m.size as u64).sum::<u64>(), true); | ^^^^^^^^^^^^^ help: try: `m.size` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:48:51 | 48 | let pb = PBar::new(modules.iter().map(|m| m.size as u64).sum::<u64>(), true); | ^^^^^^^^^^^^^ help: try: `m.size` | = 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
redundant closure: scanflow/src/disasm.rs#L46
warning: redundant closure --> scanflow/src/disasm.rs:46:44 | 46 | let sections = ThreadLocalCtx::new(|| Vec::<SectionInfo>::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::<SectionInfo>::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
redundant closure: scanflow/src/disasm.rs#L46
warning: redundant closure --> scanflow/src/disasm.rs:46:44 | 46 | let sections = ThreadLocalCtx::new(|| Vec::<SectionInfo>::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::<SectionInfo>::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
lint
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
lint
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (ubuntu-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (ubuntu-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
very complex type used. Consider factoring parts into `type` definitions: scanflow-cli/src/main.rs#L81
warning: very complex type used. Consider factoring parts into `type` definitions --> scanflow-cli/src/main.rs:81:6 | 81 | ) -> Result<( | ______^ 82 | | Either<OsChain, ConnectorChain>, 83 | | Option<&str>, 84 | | bool, 85 | | log::Level, 86 | | )> { | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: scanflow-cli/src/main.rs#L38
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow-cli/src/main.rs:38:51 | 38 | let process = os.into_process_by_name(&target)?; | ^^^^^^^ help: change this to: `target` | = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L725
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:725:13 | 725 | let b = TYPES | _____________^ 726 | | .iter() 727 | | .filter(|Type(name, _, _, _)| name == &typename) 728 | | .next()? | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 725 ~ let b = TYPES 726 ~ .iter().find(|Type(name, _, _, _)| name == &typename)? |
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L721
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:721:41 | 721 | let mut words = input.splitn(2, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
very complex type used. Consider factoring parts into `type` definitions: scanflow-cli/src/main.rs#L81
warning: very complex type used. Consider factoring parts into `type` definitions --> scanflow-cli/src/main.rs:81:6 | 81 | ) -> Result<( | ______^ 82 | | Either<OsChain, ConnectorChain>, 83 | | Option<&str>, 84 | | bool, 85 | | log::Level, 86 | | )> { | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L710
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:710:5 | 710 | / TYPES 711 | | .iter() 712 | | .filter(|Type(name, _, _, _)| name == &typename) 713 | | .next() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 710 ~ TYPES 711 + .iter().find(|Type(name, _, _, _)| name == &typename) |
this expression creates a reference which is immediately dereferenced by the compiler: scanflow-cli/src/main.rs#L38
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow-cli/src/main.rs:38:51 | 38 | let process = os.into_process_by_name(&target)?; | ^^^^^^^ help: change this to: `target` | = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L725
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:725:13 | 725 | let b = TYPES | _____________^ 726 | | .iter() 727 | | .filter(|Type(name, _, _, _)| name == &typename) 728 | | .next()? | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 725 ~ let b = TYPES 726 ~ .iter().find(|Type(name, _, _, _)| name == &typename)? |
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L721
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:721:41 | 721 | let mut words = input.splitn(2, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L710
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:710:5 | 710 | / TYPES 711 | | .iter() 712 | | .filter(|Type(name, _, _, _)| name == &typename) 713 | | .next() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 710 ~ TYPES 711 + .iter().find(|Type(name, _, _, _)| name == &typename) |
useless use of `format!`: scanflow-cli/src/cli.rs#L625
warning: useless use of `format!` --> scanflow-cli/src/cli.rs:625:18 | 625 | Some(format!("{}", String::from_utf16_lossy(&vec))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `String::from_utf16_lossy(&vec).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
`to_string` applied to a type that implements `Display` in `println!` args: scanflow-cli/src/cli.rs#L590
warning: `to_string` applied to a type that implements `Display` in `println!` args --> scanflow-cli/src/cli.rs:590:57 | 590 | println!("Error reading line: {}", e.to_string()); | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
useless use of `format!`: scanflow-cli/src/cli.rs#L625
warning: useless use of `format!` --> scanflow-cli/src/cli.rs:625:18 | 625 | Some(format!("{}", String::from_utf16_lossy(&vec))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `String::from_utf16_lossy(&vec).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L555
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:555:36 | 555 | let mut words = args.splitn(3, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
`to_string` applied to a type that implements `Display` in `println!` args: scanflow-cli/src/cli.rs#L590
warning: `to_string` applied to a type that implements `Display` in `println!` args --> scanflow-cli/src/cli.rs:590:57 | 590 | println!("Error reading line: {}", e.to_string()); | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L555
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:555:36 | 555 | let mut words = args.splitn(3, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: scanflow-cli/src/cli.rs#L397
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> scanflow-cli/src/cli.rs:397:16 | 397 | .chain(proc_cmds().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `proc_cmds()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:523:12 = 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
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: scanflow-cli/src/cli.rs#L397
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> scanflow-cli/src/cli.rs:397:16 | 397 | .chain(proc_cmds().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `proc_cmds()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:523:12 = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L168
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:168:52 | 168 | if let Some(Type(_, size, _, _)) = TYPES | ____________________________________________________^ 169 | | .iter() 170 | | .filter(|Type(name, _, _, _)| name == &arg) 171 | | .next() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next = note: `#[warn(clippy::filter_next)]` on by default help: try | 168 ~ if let Some(Type(_, size, _, _)) = TYPES 169 + .iter().find(|Type(name, _, _, _)| name == &arg) |
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L168
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:168:52 | 168 | if let Some(Type(_, size, _, _)) = TYPES | ____________________________________________________^ 169 | | .iter() 170 | | .filter(|Type(name, _, _, _)| name == &arg) 171 | | .next() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next = note: `#[warn(clippy::filter_next)]` on by default help: try | 168 ~ if let Some(Type(_, size, _, _)) = TYPES 169 + .iter().find(|Type(name, _, _, _)| name == &arg) |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L494
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:494:24 | 494 | } else { | ________________________^ 495 | | if let Some((buf, t)) = parse_input(line, &ctx.typename) { 496 | | ctx.buf_len = buf.len(); 497 | | ctx.value_scanner ... | 503 | | } 504 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 494 ~ } else if let Some((buf, t)) = parse_input(line, &ctx.typename) { 495 + ctx.buf_len = buf.len(); 496 + ctx.value_scanner 497 + .scan_for_2(&mut ctx.memory, ctx.funcs.maps, &buf)?; 498 + print_matches(&ctx.value_scanner, &mut ctx.memory, ctx.buf_len, &t)?; 499 + ctx.typename = Some(t); 500 + } else { 501 + println!("Invalid input! Use `help` for command reference."); 502 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L494
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:494:24 | 494 | } else { | ________________________^ 495 | | if let Some((buf, t)) = parse_input(line, &ctx.typename) { 496 | | ctx.buf_len = buf.len(); 497 | | ctx.value_scanner ... | 503 | | } 504 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 494 ~ } else if let Some((buf, t)) = parse_input(line, &ctx.typename) { 495 + ctx.buf_len = buf.len(); 496 + ctx.value_scanner 497 + .scan_for_2(&mut ctx.memory, ctx.funcs.maps, &buf)?; 498 + print_matches(&ctx.value_scanner, &mut ctx.memory, ctx.buf_len, &t)?; 499 + ctx.typename = Some(t); 500 + } else { 501 + println!("Invalid input! Use `help` for command reference."); 502 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L467
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:467:24 | 467 | } else { | ________________________^ 468 | | if let Some(cmd) = cmds 469 | | .iter_mut() 470 | | .find(|cmd| cmd.short == args || cmd.long == args) ... | 485 | | } 486 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 467 ~ } else if let Some(cmd) = cmds 468 + .iter_mut() 469 + .find(|cmd| cmd.short == args || cmd.long == args) 470 + { 471 + println!("{}", cmd.help); 472 + println!(); 473 + if let Some(long) = cmd.long_help { 474 + println!("{}", long); 475 + } else { 476 + println!("(no further help available)"); 477 + } 478 + } else if ["quit", "help", "q", "h"].contains(&args) { 479 + println!("Built-in command with no further help"); 480 + } else { 481 + println!( 482 + "Could not find command `{args}`. Use `help` for command reference." 483 + ); 484 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L467
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:467:24 | 467 | } else { | ________________________^ 468 | | if let Some(cmd) = cmds 469 | | .iter_mut() 470 | | .find(|cmd| cmd.short == args || cmd.long == args) ... | 485 | | } 486 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 467 ~ } else if let Some(cmd) = cmds 468 + .iter_mut() 469 + .find(|cmd| cmd.short == args || cmd.long == args) 470 + { 471 + println!("{}", cmd.help); 472 + println!(); 473 + if let Some(long) = cmd.long_help { 474 + println!("{}", long); 475 + } else { 476 + println!("(no further help available)"); 477 + } 478 + } else if ["quit", "help", "q", "h"].contains(&args) { 479 + println!("Built-in command with no further help"); 480 + } else { 481 + println!( 482 + "Could not find command `{args}`. Use `help` for command reference." 483 + ); 484 + } |
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: scanflow/src/value_scanner.rs#L112
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> scanflow/src/value_scanner.rs:112:31 | 112 | let old_matches = std::mem::replace(&mut self.matches, vec![]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.matches)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/value_scanner.rs#L72
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/value_scanner.rs:72:21 | 72 | / (0..size) 73 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/value_scanner.rs#L62
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/value_scanner.rs:62:46 | 62 | .map(|CTup3(_, size, _)| *size as u64) | ^^^^^^^^^^^^ help: try: `*size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/sigmaker.rs#L207
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/sigmaker.rs:207:32 | 207 | decoder.set_ip(start_ip.to_umem() as u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `start_ip.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: scanflow/src/value_scanner.rs#L112
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> scanflow/src/value_scanner.rs:112:31 | 112 | let old_matches = std::mem::replace(&mut self.matches, vec![]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.matches)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/value_scanner.rs#L72
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/value_scanner.rs:72:21 | 72 | / (0..size) 73 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/value_scanner.rs#L62
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/value_scanner.rs:62:46 | 62 | .map(|CTup3(_, size, _)| *size as u64) | ^^^^^^^^^^^^ help: try: `*size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this expression creates a reference which is immediately dereferenced by the compiler: scanflow/src/sigmaker.rs#L58
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow/src/sigmaker.rs:58:31 | 58 | Self::mask_branch(&offsets, mask, 1); | ^^^^^^^^ help: change this to: `offsets` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/sigmaker.rs#L207
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/sigmaker.rs:207:32 | 207 | decoder.set_ip(start_ip.to_umem() as u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `start_ip.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this function has too many arguments (10/7): scanflow/src/pointer_map.rs#L135
warning: this function has too many arguments (10/7) --> scanflow/src/pointer_map.rs:135:5 | 135 | / fn walk_down_range( 136 | | &self, 137 | | addr: Address, 138 | | (lrange, urange): (usize, usize), ... | 145 | | (pb_start, pb_end): (f32, f32), 146 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: scanflow/src/sigmaker.rs#L58
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow/src/sigmaker.rs:58:31 | 58 | Self::mask_branch(&offsets, mask, 1); | ^^^^^^^^ help: change this to: `offsets` | = 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
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/pointer_map.rs#L61
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/pointer_map.rs:61:17 | 61 | / (0..size) 62 | | .into_iter() | |________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/pointer_map.rs#L51
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/pointer_map.rs:51:42 | 51 | .map(|CTup3(_, size, _)| size.to_umem() as u64) | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this function has too many arguments (10/7): scanflow/src/pointer_map.rs#L135
warning: this function has too many arguments (10/7) --> scanflow/src/pointer_map.rs:135:5 | 135 | / fn walk_down_range( 136 | | &self, 137 | | addr: Address, 138 | | (lrange, urange): (usize, usize), ... | 145 | | (pb_start, pb_end): (f32, f32), 146 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/pointer_map.rs#L61
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/pointer_map.rs:61:17 | 61 | / (0..size) 62 | | .into_iter() | |________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/pointer_map.rs#L51
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/pointer_map.rs:51:42 | 51 | .map(|CTup3(_, size, _)| size.to_umem() as u64) | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L129
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:129:28 | 129 | pb.add(m.size as u64); | ^^^^^^^^^^^^^ help: try: `m.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L129
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:129:28 | 129 | pb.add(m.size as u64); | ^^^^^^^^^^^^^ help: try: `m.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L101
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:101:52 | 101 | ... decoder.set_ip(addr as u64); | ^^^^^^^^^^^ help: try: `addr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L101
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:101:52 | 101 | ... decoder.set_ip(addr as u64); | ^^^^^^^^^^^ help: try: `addr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:48:51 | 48 | let pb = PBar::new(modules.iter().map(|m| m.size as u64).sum::<u64>(), true); | ^^^^^^^^^^^^^ help: try: `m.size` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:48:51 | 48 | let pb = PBar::new(modules.iter().map(|m| m.size as u64).sum::<u64>(), true); | ^^^^^^^^^^^^^ help: try: `m.size` | = 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
redundant closure: scanflow/src/disasm.rs#L46
warning: redundant closure --> scanflow/src/disasm.rs:46:44 | 46 | let sections = ThreadLocalCtx::new(|| Vec::<SectionInfo>::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::<SectionInfo>::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
redundant closure: scanflow/src/disasm.rs#L46
warning: redundant closure --> scanflow/src/disasm.rs:46:44 | 46 | let sections = ThreadLocalCtx::new(|| Vec::<SectionInfo>::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::<SectionInfo>::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
build (macos-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
very complex type used. Consider factoring parts into `type` definitions: scanflow-cli/src/main.rs#L81
warning: very complex type used. Consider factoring parts into `type` definitions --> scanflow-cli/src/main.rs:81:6 | 81 | ) -> Result<( | ______^ 82 | | Either<OsChain, ConnectorChain>, 83 | | Option<&str>, 84 | | bool, 85 | | log::Level, 86 | | )> { | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
this expression creates a reference which is immediately dereferenced by the compiler: scanflow-cli/src/main.rs#L38
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow-cli/src/main.rs:38:51 | 38 | let process = os.into_process_by_name(&target)?; | ^^^^^^^ help: change this to: `target` | = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L725
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:725:13 | 725 | let b = TYPES | _____________^ 726 | | .iter() 727 | | .filter(|Type(name, _, _, _)| name == &typename) 728 | | .next()? | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 725 ~ let b = TYPES 726 ~ .iter().find(|Type(name, _, _, _)| name == &typename)? |
very complex type used. Consider factoring parts into `type` definitions: scanflow-cli/src/main.rs#L81
warning: very complex type used. Consider factoring parts into `type` definitions --> scanflow-cli/src/main.rs:81:6 | 81 | ) -> Result<( | ______^ 82 | | Either<OsChain, ConnectorChain>, 83 | | Option<&str>, 84 | | bool, 85 | | log::Level, 86 | | )> { | |__^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#type_complexity = note: `#[warn(clippy::type_complexity)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L721
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:721:41 | 721 | let mut words = input.splitn(2, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L710
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:710:5 | 710 | / TYPES 711 | | .iter() 712 | | .filter(|Type(name, _, _, _)| name == &typename) 713 | | .next() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 710 ~ TYPES 711 + .iter().find(|Type(name, _, _, _)| name == &typename) |
this expression creates a reference which is immediately dereferenced by the compiler: scanflow-cli/src/main.rs#L38
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow-cli/src/main.rs:38:51 | 38 | let process = os.into_process_by_name(&target)?; | ^^^^^^^ help: change this to: `target` | = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L725
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:725:13 | 725 | let b = TYPES | _____________^ 726 | | .iter() 727 | | .filter(|Type(name, _, _, _)| name == &typename) 728 | | .next()? | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 725 ~ let b = TYPES 726 ~ .iter().find(|Type(name, _, _, _)| name == &typename)? |
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L721
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:721:41 | 721 | let mut words = input.splitn(2, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L710
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:710:5 | 710 | / TYPES 711 | | .iter() 712 | | .filter(|Type(name, _, _, _)| name == &typename) 713 | | .next() | |_______________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next help: try | 710 ~ TYPES 711 + .iter().find(|Type(name, _, _, _)| name == &typename) |
useless use of `format!`: scanflow-cli/src/cli.rs#L625
warning: useless use of `format!` --> scanflow-cli/src/cli.rs:625:18 | 625 | Some(format!("{}", String::from_utf16_lossy(&vec))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `String::from_utf16_lossy(&vec).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
`to_string` applied to a type that implements `Display` in `println!` args: scanflow-cli/src/cli.rs#L590
warning: `to_string` applied to a type that implements `Display` in `println!` args --> scanflow-cli/src/cli.rs:590:57 | 590 | println!("Error reading line: {}", e.to_string()); | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L555
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:555:36 | 555 | let mut words = args.splitn(3, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
useless use of `format!`: scanflow-cli/src/cli.rs#L625
warning: useless use of `format!` --> scanflow-cli/src/cli.rs:625:18 | 625 | Some(format!("{}", String::from_utf16_lossy(&vec))) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `String::from_utf16_lossy(&vec).to_string()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format = note: `#[warn(clippy::useless_format)]` on by default
`to_string` applied to a type that implements `Display` in `println!` args: scanflow-cli/src/cli.rs#L590
warning: `to_string` applied to a type that implements `Display` in `println!` args --> scanflow-cli/src/cli.rs:590:57 | 590 | println!("Error reading line: {}", e.to_string()); | ^^^^^^^^^^^^ help: remove this | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args = note: `#[warn(clippy::to_string_in_format_args)]` on by default
single-character string constant used as pattern: scanflow-cli/src/cli.rs#L555
warning: single-character string constant used as pattern --> scanflow-cli/src/cli.rs:555:36 | 555 | let mut words = args.splitn(3, " "); | ^^^ help: try using a `char` instead: `' '` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern = note: `#[warn(clippy::single_char_pattern)]` on by default
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: scanflow-cli/src/cli.rs#L397
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> scanflow-cli/src/cli.rs:397:16 | 397 | .chain(proc_cmds().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `proc_cmds()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:523:12 = 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
explicit call to `.into_iter()` in function argument accepting `IntoIterator`: scanflow-cli/src/cli.rs#L397
warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` --> scanflow-cli/src/cli.rs:397:16 | 397 | .chain(proc_cmds().into_iter()) | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing the `.into_iter()`: `proc_cmds()` | note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` --> /rustc/a28077b28a02b92985b3a3faecf92813155f1ea1/library/core/src/iter/traits/iterator.rs:523:12 = 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
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L168
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:168:52 | 168 | if let Some(Type(_, size, _, _)) = TYPES | ____________________________________________________^ 169 | | .iter() 170 | | .filter(|Type(name, _, _, _)| name == &arg) 171 | | .next() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next = note: `#[warn(clippy::filter_next)]` on by default help: try | 168 ~ if let Some(Type(_, size, _, _)) = TYPES 169 + .iter().find(|Type(name, _, _, _)| name == &arg) |
called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead: scanflow-cli/src/cli.rs#L168
warning: called `filter(..).next()` on an `Iterator`. This is more succinctly expressed by calling `.find(..)` instead --> scanflow-cli/src/cli.rs:168:52 | 168 | if let Some(Type(_, size, _, _)) = TYPES | ____________________________________________________^ 169 | | .iter() 170 | | .filter(|Type(name, _, _, _)| name == &arg) 171 | | .next() | |___________________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#filter_next = note: `#[warn(clippy::filter_next)]` on by default help: try | 168 ~ if let Some(Type(_, size, _, _)) = TYPES 169 + .iter().find(|Type(name, _, _, _)| name == &arg) |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L494
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:494:24 | 494 | } else { | ________________________^ 495 | | if let Some((buf, t)) = parse_input(line, &ctx.typename) { 496 | | ctx.buf_len = buf.len(); 497 | | ctx.value_scanner ... | 503 | | } 504 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 494 ~ } else if let Some((buf, t)) = parse_input(line, &ctx.typename) { 495 + ctx.buf_len = buf.len(); 496 + ctx.value_scanner 497 + .scan_for_2(&mut ctx.memory, ctx.funcs.maps, &buf)?; 498 + print_matches(&ctx.value_scanner, &mut ctx.memory, ctx.buf_len, &t)?; 499 + ctx.typename = Some(t); 500 + } else { 501 + println!("Invalid input! Use `help` for command reference."); 502 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L494
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:494:24 | 494 | } else { | ________________________^ 495 | | if let Some((buf, t)) = parse_input(line, &ctx.typename) { 496 | | ctx.buf_len = buf.len(); 497 | | ctx.value_scanner ... | 503 | | } 504 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if help: collapse nested if block | 494 ~ } else if let Some((buf, t)) = parse_input(line, &ctx.typename) { 495 + ctx.buf_len = buf.len(); 496 + ctx.value_scanner 497 + .scan_for_2(&mut ctx.memory, ctx.funcs.maps, &buf)?; 498 + print_matches(&ctx.value_scanner, &mut ctx.memory, ctx.buf_len, &t)?; 499 + ctx.typename = Some(t); 500 + } else { 501 + println!("Invalid input! Use `help` for command reference."); 502 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L467
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:467:24 | 467 | } else { | ________________________^ 468 | | if let Some(cmd) = cmds 469 | | .iter_mut() 470 | | .find(|cmd| cmd.short == args || cmd.long == args) ... | 485 | | } 486 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 467 ~ } else if let Some(cmd) = cmds 468 + .iter_mut() 469 + .find(|cmd| cmd.short == args || cmd.long == args) 470 + { 471 + println!("{}", cmd.help); 472 + println!(); 473 + if let Some(long) = cmd.long_help { 474 + println!("{}", long); 475 + } else { 476 + println!("(no further help available)"); 477 + } 478 + } else if ["quit", "help", "q", "h"].contains(&args) { 479 + println!("Built-in command with no further help"); 480 + } else { 481 + println!( 482 + "Could not find command `{args}`. Use `help` for command reference." 483 + ); 484 + } |
this `else { if .. }` block can be collapsed: scanflow-cli/src/cli.rs#L467
warning: this `else { if .. }` block can be collapsed --> scanflow-cli/src/cli.rs:467:24 | 467 | } else { | ________________________^ 468 | | if let Some(cmd) = cmds 469 | | .iter_mut() 470 | | .find(|cmd| cmd.short == args || cmd.long == args) ... | 485 | | } 486 | | } | |_________________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if = note: `#[warn(clippy::collapsible_else_if)]` on by default help: collapse nested if block | 467 ~ } else if let Some(cmd) = cmds 468 + .iter_mut() 469 + .find(|cmd| cmd.short == args || cmd.long == args) 470 + { 471 + println!("{}", cmd.help); 472 + println!(); 473 + if let Some(long) = cmd.long_help { 474 + println!("{}", long); 475 + } else { 476 + println!("(no further help available)"); 477 + } 478 + } else if ["quit", "help", "q", "h"].contains(&args) { 479 + println!("Built-in command with no further help"); 480 + } else { 481 + println!( 482 + "Could not find command `{args}`. Use `help` for command reference." 483 + ); 484 + } |
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: scanflow/src/value_scanner.rs#L112
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> scanflow/src/value_scanner.rs:112:31 | 112 | let old_matches = std::mem::replace(&mut self.matches, vec![]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.matches)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/value_scanner.rs#L72
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/value_scanner.rs:72:21 | 72 | / (0..size) 73 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/value_scanner.rs#L62
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/value_scanner.rs:62:46 | 62 | .map(|CTup3(_, size, _)| *size as u64) | ^^^^^^^^^^^^ help: try: `*size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/sigmaker.rs#L207
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/sigmaker.rs:207:32 | 207 | decoder.set_ip(start_ip.to_umem() as u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `start_ip.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take`: scanflow/src/value_scanner.rs#L112
warning: replacing a value of type `T` with `T::default()` is better expressed using `std::mem::take` --> scanflow/src/value_scanner.rs:112:31 | 112 | let old_matches = std::mem::replace(&mut self.matches, vec![]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `std::mem::take(&mut self.matches)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_with_default = note: `#[warn(clippy::mem_replace_with_default)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/value_scanner.rs#L72
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/value_scanner.rs:72:21 | 72 | / (0..size) 73 | | .into_iter() | |____________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/value_scanner.rs#L62
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/value_scanner.rs:62:46 | 62 | .map(|CTup3(_, size, _)| *size as u64) | ^^^^^^^^^^^^ help: try: `*size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/sigmaker.rs#L207
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/sigmaker.rs:207:32 | 207 | decoder.set_ip(start_ip.to_umem() as u64); | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `start_ip.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
this expression creates a reference which is immediately dereferenced by the compiler: scanflow/src/sigmaker.rs#L58
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow/src/sigmaker.rs:58:31 | 58 | Self::mask_branch(&offsets, mask, 1); | ^^^^^^^^ help: change this to: `offsets` | = 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
this expression creates a reference which is immediately dereferenced by the compiler: scanflow/src/sigmaker.rs#L58
warning: this expression creates a reference which is immediately dereferenced by the compiler --> scanflow/src/sigmaker.rs:58:31 | 58 | Self::mask_branch(&offsets, mask, 1); | ^^^^^^^^ help: change this to: `offsets` | = 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
this function has too many arguments (10/7): scanflow/src/pointer_map.rs#L135
warning: this function has too many arguments (10/7) --> scanflow/src/pointer_map.rs:135:5 | 135 | / fn walk_down_range( 136 | | &self, 137 | | addr: Address, 138 | | (lrange, urange): (usize, usize), ... | 145 | | (pb_start, pb_end): (f32, f32), 146 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
this function has too many arguments (10/7): scanflow/src/pointer_map.rs#L135
warning: this function has too many arguments (10/7) --> scanflow/src/pointer_map.rs:135:5 | 135 | / fn walk_down_range( 136 | | &self, 137 | | addr: Address, 138 | | (lrange, urange): (usize, usize), ... | 145 | | (pb_start, pb_end): (f32, f32), 146 | | ) { | |______^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments = note: `#[warn(clippy::too_many_arguments)]` on by default
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/pointer_map.rs#L61
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/pointer_map.rs:61:17 | 61 | / (0..size) 62 | | .into_iter() | |________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/pointer_map.rs#L51
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/pointer_map.rs:51:42 | 51 | .map(|CTup3(_, size, _)| size.to_umem() as u64) | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
useless conversion to the same type: `std::ops::Range<u64>`: scanflow/src/pointer_map.rs#L61
warning: useless conversion to the same type: `std::ops::Range<u64>` --> scanflow/src/pointer_map.rs:61:17 | 61 | / (0..size) 62 | | .into_iter() | |________________________________^ help: consider removing `.into_iter()`: `(0..size)` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/pointer_map.rs#L51
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/pointer_map.rs:51:42 | 51 | .map(|CTup3(_, size, _)| size.to_umem() as u64) | ^^^^^^^^^^^^^^^^^^^^^ help: try: `size.to_umem()` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L129
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:129:28 | 129 | pb.add(m.size as u64); | ^^^^^^^^^^^^^ help: try: `m.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L129
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:129:28 | 129 | pb.add(m.size as u64); | ^^^^^^^^^^^^^ help: try: `m.size` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L101
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:101:52 | 101 | ... decoder.set_ip(addr as u64); | ^^^^^^^^^^^ help: try: `addr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L101
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:101:52 | 101 | ... decoder.set_ip(addr as u64); | ^^^^^^^^^^^ help: try: `addr` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:48:51 | 48 | let pb = PBar::new(modules.iter().map(|m| m.size as u64).sum::<u64>(), true); | ^^^^^^^^^^^^^ help: try: `m.size` | = 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
casting to the same type is unnecessary (`u64` -> `u64`): scanflow/src/disasm.rs#L48
warning: casting to the same type is unnecessary (`u64` -> `u64`) --> scanflow/src/disasm.rs:48:51 | 48 | let pb = PBar::new(modules.iter().map(|m| m.size as u64).sum::<u64>(), true); | ^^^^^^^^^^^^^ help: try: `m.size` | = 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
redundant closure: scanflow/src/disasm.rs#L46
warning: redundant closure --> scanflow/src/disasm.rs:46:44 | 46 | let sections = ThreadLocalCtx::new(|| Vec::<SectionInfo>::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::<SectionInfo>::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
redundant closure: scanflow/src/disasm.rs#L46
warning: redundant closure --> scanflow/src/disasm.rs:46:44 | 46 | let sections = ThreadLocalCtx::new(|| Vec::<SectionInfo>::new()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the function itself: `Vec::<SectionInfo>::new` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure = note: `#[warn(clippy::redundant_closure)]` on by default
build-cross-aarch64
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-cross-aarch64
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1, actions-rs/cargo@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
test-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test-cross-aarch64
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (windows-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
test (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
build (windows-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (macos-latest)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
test (macos-latest)
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/