[INFO] updating cached repository cohama/toyjq [INFO] running `"git" "fetch" "--all"` [INFO] [stdout] Fetching origin [INFO] [stderr] From git://github.com/cohama/toyjq [INFO] [stderr] * branch HEAD -> FETCH_HEAD [INFO] running `"git" "clone" "work/cache/sources/gh/cohama/toyjq" "work/ex/clippy-test-run/sources/stable/gh/cohama/toyjq"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable/gh/cohama/toyjq'... [INFO] [stderr] done. [INFO] running `"git" "clone" "work/cache/sources/gh/cohama/toyjq" "work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cohama/toyjq"` [INFO] [stderr] Cloning into 'work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cohama/toyjq'... [INFO] [stderr] done. [INFO] running `"git" "rev-parse" "HEAD"` [INFO] [stdout] 8de3e9e427f7a24fe6272b149a4543ac4a304875 [INFO] sha for GitHub repo cohama/toyjq: 8de3e9e427f7a24fe6272b149a4543ac4a304875 [INFO] validating manifest of cohama/toyjq 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 cohama/toyjq 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 cohama/toyjq [INFO] finished frobbing cohama/toyjq [INFO] frobbed toml for cohama/toyjq written to work/ex/clippy-test-run/sources/stable/gh/cohama/toyjq/Cargo.toml [INFO] started frobbing cohama/toyjq [INFO] finished frobbing cohama/toyjq [INFO] frobbed toml for cohama/toyjq written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cohama/toyjq/Cargo.toml [INFO] crate cohama/toyjq 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 cohama/toyjq against stable+rustflags=-Dclippy::into_iter_on_array for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-1/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/gh/cohama/toyjq:/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 -Dclippy::into_iter_on_array" "-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] 3f3050fa2b06c536e71e6559ae24a801c49b8ef8b9d048b28f4047919f57bbcf [INFO] running `"docker" "start" "-a" "3f3050fa2b06c536e71e6559ae24a801c49b8ef8b9d048b28f4047919f57bbcf"` [INFO] [stderr] Checking toyjq v0.1.0 (/opt/crater/workdir) [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:233:51 [INFO] [stderr] | [INFO] [stderr] 233 | f(o).run(input2).map_err(|ParseError {retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:252:48 [INFO] [stderr] | [INFO] [stderr] 252 | p.run(input2).map_err(|ParseError {retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:283:46 [INFO] [stderr] | [INFO] [stderr] 283 | .map_err(|ParseError{retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:305:66 [INFO] [stderr] | [INFO] [stderr] 305 | let (input3, o2) = p.run(input2).map_err(|ParseError{retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:326:68 [INFO] [stderr] | [INFO] [stderr] 326 | let (input3, o2) = f().run(input2).map_err(|ParseError{retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:233:51 [INFO] [stderr] | [INFO] [stderr] 233 | f(o).run(input2).map_err(|ParseError {retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unneeded_field_pattern)] on by default [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:252:48 [INFO] [stderr] | [INFO] [stderr] 252 | p.run(input2).map_err(|ParseError {retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:283:46 [INFO] [stderr] | [INFO] [stderr] 283 | .map_err(|ParseError{retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:305:66 [INFO] [stderr] | [INFO] [stderr] 305 | let (input3, o2) = p.run(input2).map_err(|ParseError{retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/parsercombinator.rs:326:68 [INFO] [stderr] | [INFO] [stderr] 326 | let (input3, o2) = f().run(input2).map_err(|ParseError{retry: _, message, pos}| { [INFO] [stderr] | ^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { message, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/parsercombinator.rs:524:62 [INFO] [stderr] | [INFO] [stderr] 524 | assert_eq!(parse_digit().parse("-999123").unwrap(), -999123); [INFO] [stderr] | ^^^^^^ help: consider: `999_123` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/parsercombinator.rs:526:73 [INFO] [stderr] | [INFO] [stderr] 526 | assert_eq!(parse_num().parse("-987654321").unwrap(), Expr::Num(-987654321)); [INFO] [stderr] | ^^^^^^^^^ help: consider: `987_654_321` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/parsercombinator.rs:530:24 [INFO] [stderr] | [INFO] [stderr] 530 | Expr::Num(-987654321) [INFO] [stderr] | ^^^^^^^^^ help: consider: `987_654_321` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: You matched a field with a wildcard pattern. Consider using `..` instead [INFO] [stderr] --> src/json.rs:279:40 [INFO] [stderr] | [INFO] [stderr] 279 | let ParseError {retry, message: _, pos} = Json::from_str("[[null, null ],[null ,null null] , [ null ] ] ").unwrap_err(); [INFO] [stderr] | ^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: Try with `ParseError { retry, pos, .. }` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unneeded_field_pattern [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] --> src/parsercombinator.rs:138:1 [INFO] [stderr] | [INFO] [stderr] 138 | / pub fn until<'a>(s: &'a str) -> Parser<'a, &'a str> { [INFO] [stderr] 139 | | Parser(Box::new(move |input| { [INFO] [stderr] 140 | | let initpos = input.pos; [INFO] [stderr] 141 | | let mut i = input; [INFO] [stderr] ... | [INFO] [stderr] 155 | | })) [INFO] [stderr] 156 | | } [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: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:20:28 [INFO] [stderr] | [INFO] [stderr] 20 | fn pretty_walk(ds: &Vec, width: i32, rest_width: &mut i32, indent: &mut i32, ret: &mut String) { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/prettyprinter.rs:54:42 [INFO] [stderr] | [INFO] [stderr] 54 | pretty_walk(&self.0, width, &mut width.clone(), &mut 0, &mut ret); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `width` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:59:25 [INFO] [stderr] | [INFO] [stderr] 59 | fn flatten_print(vdocs: &Vec) -> String { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:60:25 [INFO] [stderr] | [INFO] [stderr] 60 | fn flatten_walk(ds: &Vec, ret: &mut String) { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:75:26 [INFO] [stderr] | [INFO] [stderr] 75 | fn flat_doc_width(vdocs: &Vec) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:76:35 [INFO] [stderr] | [INFO] [stderr] 76 | fn flat_doc_width_walk(vdocs: &Vec) -> i32{ [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/json.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | / pub fn from_str(s: &str) -> Result { [INFO] [stderr] 16 | | parse_json().parse(s) [INFO] [stderr] 17 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:30:18 [INFO] [stderr] | [INFO] [stderr] 30 | .or_lazy(||parse_jnumber()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jnumber` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:29:18 [INFO] [stderr] | [INFO] [stderr] 29 | .or_lazy(||parse_jbool()) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jbool` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:28:18 [INFO] [stderr] | [INFO] [stderr] 28 | .or_lazy(||parse_jnull()) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jnull` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:27:18 [INFO] [stderr] | [INFO] [stderr] 27 | .or_lazy(||parse_jstring()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jstring` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:26:18 [INFO] [stderr] | [INFO] [stderr] 26 | .or_lazy(||parse_jobject()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jobject` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:63:58 [INFO] [stderr] | [INFO] [stderr] 63 | parse_string().skip(chr(':').with_spaces()).and_lazy(||parse_json()) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove closure as shown: `parse_json` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/json.rs:92:41 [INFO] [stderr] | [INFO] [stderr] 92 | fn json_vec_to_flatable_doc_elem(jsons: &Vec) -> DocElem { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Json]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/json.rs:99:29 [INFO] [stderr] | [INFO] [stderr] 99 | while let Some(j) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for j in it { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_on_iterator)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/json.rs:110:42 [INFO] [stderr] | [INFO] [stderr] 110 | fn json_object_to_flatable_doc_elem(obj: &Vec<(&str, Json)>) -> DocElem { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: change this to: `&[(&str, Json)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/json.rs:118:30 [INFO] [stderr] | [INFO] [stderr] 118 | while let Some(kv) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for kv in it { .. }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [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] --> src/parsercombinator.rs:138:1 [INFO] [stderr] | [INFO] [stderr] 138 | / pub fn until<'a>(s: &'a str) -> Parser<'a, &'a str> { [INFO] [stderr] 139 | | Parser(Box::new(move |input| { [INFO] [stderr] 140 | | let initpos = input.pos; [INFO] [stderr] 141 | | let mut i = input; [INFO] [stderr] ... | [INFO] [stderr] 155 | | })) [INFO] [stderr] 156 | | } [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: redundant closure found [INFO] [stderr] --> src/parsercombinator.rs:516:35 [INFO] [stderr] | [INFO] [stderr] 516 | parse_add().try().or_lazy(||parse_num()) [INFO] [stderr] | ^^^^^^^^^^^^^ help: remove closure as shown: `parse_num` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:20:28 [INFO] [stderr] | [INFO] [stderr] 20 | fn pretty_walk(ds: &Vec, width: i32, rest_width: &mut i32, indent: &mut i32, ret: &mut String) { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/prettyprinter.rs:54:42 [INFO] [stderr] | [INFO] [stderr] 54 | pretty_walk(&self.0, width, &mut width.clone(), &mut 0, &mut ret); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `width` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:59:25 [INFO] [stderr] | [INFO] [stderr] 59 | fn flatten_print(vdocs: &Vec) -> String { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:60:25 [INFO] [stderr] | [INFO] [stderr] 60 | fn flatten_walk(ds: &Vec, ret: &mut String) { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:75:26 [INFO] [stderr] | [INFO] [stderr] 75 | fn flat_doc_width(vdocs: &Vec) -> i32 { [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/prettyprinter.rs:76:35 [INFO] [stderr] | [INFO] [stderr] 76 | fn flat_doc_width_walk(vdocs: &Vec) -> i32{ [INFO] [stderr] | ^^^^^^^^^^^^^ help: change this to: `&[DocElem]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: defining a method called `from_str` on this type; consider implementing the `std::str::FromStr` trait or choosing a less ambiguous name [INFO] [stderr] --> src/json.rs:15:5 [INFO] [stderr] | [INFO] [stderr] 15 | / pub fn from_str(s: &str) -> Result { [INFO] [stderr] 16 | | parse_json().parse(s) [INFO] [stderr] 17 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::should_implement_trait)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:30:18 [INFO] [stderr] | [INFO] [stderr] 30 | .or_lazy(||parse_jnumber()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jnumber` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:29:18 [INFO] [stderr] | [INFO] [stderr] 29 | .or_lazy(||parse_jbool()) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jbool` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:28:18 [INFO] [stderr] | [INFO] [stderr] 28 | .or_lazy(||parse_jnull()) [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jnull` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:27:18 [INFO] [stderr] | [INFO] [stderr] 27 | .or_lazy(||parse_jstring()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jstring` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:26:18 [INFO] [stderr] | [INFO] [stderr] 26 | .or_lazy(||parse_jobject()) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: remove closure as shown: `parse_jobject` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/json.rs:63:58 [INFO] [stderr] | [INFO] [stderr] 63 | parse_string().skip(chr(':').with_spaces()).and_lazy(||parse_json()) [INFO] [stderr] | ^^^^^^^^^^^^^^ help: remove closure as shown: `parse_json` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/json.rs:92:41 [INFO] [stderr] | [INFO] [stderr] 92 | fn json_vec_to_flatable_doc_elem(jsons: &Vec) -> DocElem { [INFO] [stderr] | ^^^^^^^^^^ help: change this to: `&[Json]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/json.rs:99:29 [INFO] [stderr] | [INFO] [stderr] 99 | while let Some(j) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for j in it { .. }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::while_let_on_iterator)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/json.rs:110:42 [INFO] [stderr] | [INFO] [stderr] 110 | fn json_object_to_flatable_doc_elem(obj: &Vec<(&str, Json)>) -> DocElem { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: change this to: `&[(&str, Json)]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: this loop could be written as a `for` loop [INFO] [stderr] --> src/json.rs:118:30 [INFO] [stderr] | [INFO] [stderr] 118 | while let Some(kv) = it.next() { [INFO] [stderr] | ^^^^^^^^^ help: try: `for kv in it { .. }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator [INFO] [stderr] [INFO] [stderr] warning: casting i32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/json.rs:157:65 [INFO] [stderr] | [INFO] [stderr] 157 | ("Numbers", JArray((1..20).map(|i: i32| JNumber(i as f64)).collect())) [INFO] [stderr] | ^^^^^^^^ help: try: `f64::from(i)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1.40s [INFO] running `"docker" "inspect" "3f3050fa2b06c536e71e6559ae24a801c49b8ef8b9d048b28f4047919f57bbcf"` [INFO] running `"docker" "rm" "-f" "3f3050fa2b06c536e71e6559ae24a801c49b8ef8b9d048b28f4047919f57bbcf"` [INFO] [stdout] 3f3050fa2b06c536e71e6559ae24a801c49b8ef8b9d048b28f4047919f57bbcf