[INFO] updating cached repository michiel/toy-robot-rs [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/michiel/toy-robot-rs [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/michiel/toy-robot-rs" "work/ex/clippy-test-run/sources/stable/gh/michiel/toy-robot-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/michiel/toy-robot-rs'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/michiel/toy-robot-rs" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/michiel/toy-robot-rs"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/michiel/toy-robot-rs'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 626741caa0ef958f9073a5553258bc39b828a665 [INFO] sha for GitHub repo michiel/toy-robot-rs: 626741caa0ef958f9073a5553258bc39b828a665 [INFO] validating manifest of michiel/toy-robot-rs on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of michiel/toy-robot-rs on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing michiel/toy-robot-rs [INFO] finished frobbing michiel/toy-robot-rs [INFO] frobbed toml for michiel/toy-robot-rs written to work/ex/clippy-test-run/sources/stable/gh/michiel/toy-robot-rs/Cargo.toml [INFO] started frobbing michiel/toy-robot-rs [INFO] finished frobbing michiel/toy-robot-rs [INFO] frobbed toml for michiel/toy-robot-rs written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/michiel/toy-robot-rs/Cargo.toml [INFO] crate michiel/toy-robot-rs has a lockfile. skipping [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting michiel/toy-robot-rs against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-7/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/gh/michiel/toy-robot-rs:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] a27e1c0b34c9b8604e83777b8b68d057fab28816a3d81f6015afbc6579cf6769 [INFO] running `"docker" "start" "-a" "a27e1c0b34c9b8604e83777b8b68d057fab28816a3d81f6015afbc6579cf6769"` [INFO] [stderr] Compiling peg v0.5.1 [INFO] [stderr] Compiling toy-robot v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: this looks like an `else if` but the `else` is missing [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:58:60 [INFO] [stderr] | [INFO] [stderr] 58 | self . max_err_pos = pos ; self . expected . clear ( ) ; } if pos == self . [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::suspicious_else_formatting)] on by default [INFO] [stderr] = note: to remove this lint, add the missing `else` or add a new line before the second `if` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stderr] [INFO] [stderr] warning: this looks like an `else if` but the `else` is missing [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:58:60 [INFO] [stderr] | [INFO] [stderr] 58 | self . max_err_pos = pos ; self . expected . clear ( ) ; } if pos == self . [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::suspicious_else_formatting)] on by default [INFO] [stderr] = note: to remove this lint, add the missing `else` or add a new line before the second `if` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#suspicious_else_formatting [INFO] [stderr] [INFO] [stderr] warning: field is never used: `state` [INFO] [stderr] --> src/main.rs:50:5 [INFO] [stderr] | [INFO] [stderr] 50 | state: SimulationState, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: field is never used: `board` [INFO] [stderr] --> src/main.rs:51:5 [INFO] [stderr] | [INFO] [stderr] 51 | board: Board, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field is never used: `robot` [INFO] [stderr] --> src/main.rs:52:5 [INFO] [stderr] | [INFO] [stderr] 52 | robot: Robot, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:15:6 [INFO] [stderr] | [INFO] [stderr] 15 | ; if self . expected . len ( ) == 0 { try ! ( write ! ( fmt , "EOF" ) ) ; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self . expected.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: You appear to be counting bytes the naive way [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:50:46 [INFO] [stderr] | [INFO] [stderr] 50 | let before = & input [ .. pos ] ; let line = before . as_bytes ( ) . iter ( [INFO] [stderr] | ______________________________________________^ [INFO] [stderr] 51 | | ) . filter ( | && c | c == b'\n' ) . count ( ) + 1 ; let col = before . chars [INFO] [stderr] | |_______________________________________________^ help: Consider using the bytecount crate: `bytecount::count(before . as_bytes ( ), b'\n')` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::naive_bytecount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#naive_bytecount [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:61:692 [INFO] [stderr] | [INFO] [stderr] 61 | fn parse_number < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < i64 > { # ! [ allow ( non_snake_case , unused ) ] { let seq_res = { let str_start = __pos ; match { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = if __input . len ( ) > __pos { let ( __ch , __next ) = char_range_at ( __input , __pos ) ; match __ch { '0' ... '9' => Matched ( __next , ( ) ) , _ => __state . mark_failure ( __pos , "[0-9]" ) , } } else { __state . mark_failure ( __pos , "[0-9]" ) } ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } { Matched ( newpos , _ ) => { Matched ( newpos , & __input [ str_start .. newpos ] ) } , Failed => Failed , } } ; match seq_res { Matched ( __pos , n ) => { Matched ( __pos , { n.parse().unwrap() } ) } Failed => Failed , } } } [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unit_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 61 | fn parse_number < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < i64 > { # ! [ allow ( non_snake_case , unused ) ] { let seq_res = { let str_start = __pos ; match { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = if __input . len ( ) > __pos { let ( __ch , __next ) = char_range_at ( __input , __pos ) ; match __ch { '0' ... '9' => Matched ( __next , ( ) ) , _ => __state . mark_failure ( __pos , "[0-9]" ) , } } else { __state . mark_failure ( __pos , "[0-9]" ) } ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( () ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } { Matched ( newpos , _ ) => { Matched ( newpos , & __input [ str_start .. newpos ] ) } , Failed => Failed , } } ; match seq_res { Matched ( __pos , n ) => { Matched ( __pos , { n.parse().unwrap() } ) } Failed => Failed , } } } [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to one [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:61:735 [INFO] [stderr] | [INFO] [stderr] 61 | fn parse_number < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < i64 > { # ! [ allow ( non_snake_case , unused ) ] { let seq_res = { let str_start = __pos ; match { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = if __input . len ( ) > __pos { let ( __ch , __next ) = char_range_at ( __input , __pos ) ; match __ch { '0' ... '9' => Matched ( __next , ( ) ) , _ => __state . mark_failure ( __pos , "[0-9]" ) , } } else { __state . mark_failure ( __pos , "[0-9]" ) } ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } { Matched ( newpos , _ ) => { Matched ( newpos , & __input [ str_start .. newpos ] ) } , Failed => Failed , } } ; match seq_res { Matched ( __pos , n ) => { Matched ( __pos , { n.parse().unwrap() } ) } Failed => Failed , } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!repeat_value.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:1819 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( () ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to one [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:1862 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!repeat_value.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:2367 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( () ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to one [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:2410 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!repeat_value.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:67:2 [INFO] [stderr] | [INFO] [stderr] 67 | pub fn direction < 'input > ( input : & 'input str ) -> ParseResult < Direction > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_direction ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:67:168 [INFO] [stderr] | [INFO] [stderr] 67 | pub fn direction < 'input > ( input : & 'input str ) -> ParseResult < Direction > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_direction ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `if let Matched ( pos , value ) = parse_direction ( input , & mut state , 0 ) { if pos == input . len ( ) { return Ok ( value ) } }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:69:2 [INFO] [stderr] | [INFO] [stderr] 69 | pub fn command < 'input > ( input : & 'input str ) -> ParseResult < Command > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_command ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:69:164 [INFO] [stderr] | [INFO] [stderr] 69 | pub fn command < 'input > ( input : & 'input str ) -> ParseResult < Command > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_command ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `if let Matched ( pos , value ) = parse_command ( input , & mut state , 0 ) { if pos == input . len ( ) { return Ok ( value ) } }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: field is never used: `state` [INFO] [stderr] --> src/main.rs:50:5 [INFO] [stderr] | [INFO] [stderr] 50 | state: SimulationState, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(dead_code)] on by default [INFO] [stderr] [INFO] [stderr] warning: field is never used: `board` [INFO] [stderr] --> src/main.rs:51:5 [INFO] [stderr] | [INFO] [stderr] 51 | board: Board, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field is never used: `robot` [INFO] [stderr] --> src/main.rs:52:5 [INFO] [stderr] | [INFO] [stderr] 52 | robot: Robot, [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:15:6 [INFO] [stderr] | [INFO] [stderr] 15 | ; if self . expected . len ( ) == 0 { try ! ( write ! ( fmt , "EOF" ) ) ; } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self . expected.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: You appear to be counting bytes the naive way [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:50:46 [INFO] [stderr] | [INFO] [stderr] 50 | let before = & input [ .. pos ] ; let line = before . as_bytes ( ) . iter ( [INFO] [stderr] | ______________________________________________^ [INFO] [stderr] 51 | | ) . filter ( | && c | c == b'\n' ) . count ( ) + 1 ; let col = before . chars [INFO] [stderr] | |_______________________________________________^ help: Consider using the bytecount crate: `bytecount::count(before . as_bytes ( ), b'\n')` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::naive_bytecount)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#naive_bytecount [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:61:692 [INFO] [stderr] | [INFO] [stderr] 61 | fn parse_number < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < i64 > { # ! [ allow ( non_snake_case , unused ) ] { let seq_res = { let str_start = __pos ; match { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = if __input . len ( ) > __pos { let ( __ch , __next ) = char_range_at ( __input , __pos ) ; match __ch { '0' ... '9' => Matched ( __next , ( ) ) , _ => __state . mark_failure ( __pos , "[0-9]" ) , } } else { __state . mark_failure ( __pos , "[0-9]" ) } ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } { Matched ( newpos , _ ) => { Matched ( newpos , & __input [ str_start .. newpos ] ) } , Failed => Failed , } } ; match seq_res { Matched ( __pos , n ) => { Matched ( __pos , { n.parse().unwrap() } ) } Failed => Failed , } } } [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unit_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 61 | fn parse_number < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < i64 > { # ! [ allow ( non_snake_case , unused ) ] { let seq_res = { let str_start = __pos ; match { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = if __input . len ( ) > __pos { let ( __ch , __next ) = char_range_at ( __input , __pos ) ; match __ch { '0' ... '9' => Matched ( __next , ( ) ) , _ => __state . mark_failure ( __pos , "[0-9]" ) , } } else { __state . mark_failure ( __pos , "[0-9]" ) } ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( () ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } { Matched ( newpos , _ ) => { Matched ( newpos , & __input [ str_start .. newpos ] ) } , Failed => Failed , } } ; match seq_res { Matched ( __pos , n ) => { Matched ( __pos , { n.parse().unwrap() } ) } Failed => Failed , } } } [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to one [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:61:735 [INFO] [stderr] | [INFO] [stderr] 61 | fn parse_number < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < i64 > { # ! [ allow ( non_snake_case , unused ) ] { let seq_res = { let str_start = __pos ; match { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = if __input . len ( ) > __pos { let ( __ch , __next ) = char_range_at ( __input , __pos ) ; match __ch { '0' ... '9' => Matched ( __next , ( ) ) , _ => __state . mark_failure ( __pos , "[0-9]" ) , } } else { __state . mark_failure ( __pos , "[0-9]" ) } ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } { Matched ( newpos , _ ) => { Matched ( newpos , & __input [ str_start .. newpos ] ) } , Failed => Failed , } } ; match seq_res { Matched ( __pos , n ) => { Matched ( __pos , { n.parse().unwrap() } ) } Failed => Failed , } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!repeat_value.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:1819 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( () ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to one [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:1862 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!repeat_value.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: passing a unit value to a function [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:2367 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stderr] help: if you intended to pass a unit value, use a unit literal instead [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( () ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^ [INFO] [stderr] [INFO] [stderr] warning: length comparison to one [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:65:2410 [INFO] [stderr] | [INFO] [stderr] 65 | fn parse_command < 'input > ( __input : & 'input str , __state : & mut ParseState < 'input > , __pos : usize ) -> RuleResult < Command > { # ! [ allow ( non_snake_case , unused ) ] { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "MOVE" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Move } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "LEFT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Left } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "RIGHT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Right } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let choice_res = { let seq_res = slice_eq ( __input , __state , __pos , "REPORT" ) ; match seq_res { Matched ( __pos , _ ) => { Matched ( __pos , { Command::Report } ) } Failed => Failed , } } ; match choice_res { Matched ( __pos , __value ) => Matched ( __pos , __value ) , Failed => { let seq_res = slice_eq ( __input , __state , __pos , "PLACE " ) ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , x ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_number ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , y ) => { { let seq_res = { let mut __repeat_pos = __pos ; let mut repeat_value = vec ! ( ) ; loop { let __pos = __repeat_pos ; let step_res = slice_eq ( __input , __state , __pos , "," ) ; match step_res { Matched ( newpos , value ) => { __repeat_pos = newpos ; repeat_value . push ( value ) ; } , Failed => { break ; } } } if repeat_value . len ( ) >= 1 { Matched ( __repeat_pos , ( ) ) } else { Failed } } ; match seq_res { Matched ( __pos , _ ) => { { let seq_res = parse_direction ( __input , __state , __pos ) ; match seq_res { Matched ( __pos , dir ) => { Matched ( __pos , { Command::Place(x, y, dir) } ) } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } Failed => Failed , } } } } } } } } } } } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!repeat_value.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:67:2 [INFO] [stderr] | [INFO] [stderr] 67 | pub fn direction < 'input > ( input : & 'input str ) -> ParseResult < Direction > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_direction ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:67:168 [INFO] [stderr] | [INFO] [stderr] 67 | pub fn direction < 'input > ( input : & 'input str ) -> ParseResult < Direction > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_direction ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `if let Matched ( pos , value ) = parse_direction ( input , & mut state , 0 ) { if pos == input . len ( ) { return Ok ( value ) } }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:69:2 [INFO] [stderr] | [INFO] [stderr] 69 | pub fn command < 'input > ( input : & 'input str ) -> ParseResult < Command > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_command ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> /opt/crater/target/debug/build/toy-robot-363375685227df73/out/toyrobot_grammar.rs:69:164 [INFO] [stderr] | [INFO] [stderr] 69 | pub fn command < 'input > ( input : & 'input str ) -> ParseResult < Command > { # ! [ allow ( non_snake_case , unused ) ] let mut state = ParseState :: new ( ) ; match parse_command ( input , & mut state , 0 ) { Matched ( pos , value ) => { if pos == input . len ( ) { return Ok ( value ) } } _ => { } } let ( line , col ) = pos_to_line ( input , state . max_err_pos ) ; Err ( ParseError { line : line , column : col , offset : state . max_err_pos , expected : state . expected , } ) } [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `if let Matched ( pos , value ) = parse_command ( input , & mut state , 0 ) { if pos == input . len ( ) { return Ok ( value ) } }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 4.24s [INFO] running `"docker" "inspect" "a27e1c0b34c9b8604e83777b8b68d057fab28816a3d81f6015afbc6579cf6769"` [INFO] running `"docker" "rm" "-f" "a27e1c0b34c9b8604e83777b8b68d057fab28816a3d81f6015afbc6579cf6769"` [INFO] [stdout] a27e1c0b34c9b8604e83777b8b68d057fab28816a3d81f6015afbc6579cf6769