[INFO] fetching crate rscel 1.0.8... [INFO] linting rscel-1.0.8 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate rscel 1.0.8 into /workspace/builds/worker-1-tc1/source [INFO] started tweaking crates.io crate rscel 1.0.8 [INFO] removed 0 missing examples [INFO] finished tweaking crates.io crate rscel 1.0.8 [INFO] tweaked toml for crates.io crate rscel 1.0.8 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate rscel 1.0.8 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate rscel 1.0.8 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded protoc-bin-vendored v3.2.0 [INFO] [stderr] Downloaded rscel-macro v1.0.8 [INFO] [stderr] Downloaded duration-str v0.20.0 [INFO] [stderr] Downloaded uom v0.38.0 [INFO] [stderr] Downloaded protoc-bin-vendored-macos-aarch_64 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-win32 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-x86_64 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-ppcle_64 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-macos-x86_64 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-x86_32 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-s390_64 v3.2.0 [INFO] [stderr] Downloaded protoc-bin-vendored-linux-aarch_64 v3.2.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 35875140a0d7118fa649a7ce48a97eaea982873bdbb892df6415020e812cf5cc [INFO] running `Command { std: "docker" "start" "-a" "35875140a0d7118fa649a7ce48a97eaea982873bdbb892df6415020e812cf5cc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "35875140a0d7118fa649a7ce48a97eaea982873bdbb892df6415020e812cf5cc", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "35875140a0d7118fa649a7ce48a97eaea982873bdbb892df6415020e812cf5cc", kill_on_drop: false }` [INFO] [stdout] 35875140a0d7118fa649a7ce48a97eaea982873bdbb892df6415020e812cf5cc [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] dd6b746d2dba7e02c18e8bb30d03cd4c8189ac54c3a416122bffec3b6f8f7121 [INFO] running `Command { std: "docker" "start" "-a" "dd6b746d2dba7e02c18e8bb30d03cd4c8189ac54c3a416122bffec3b6f8f7121", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.182 [INFO] [stderr] Compiling bitflags v2.11.0 [INFO] [stderr] Compiling protobuf v3.7.2 [INFO] [stderr] Compiling rustix v0.38.44 [INFO] [stderr] Compiling anyhow v1.0.101 [INFO] [stderr] Compiling rustix v1.1.3 [INFO] [stderr] Compiling getrandom v0.4.1 [INFO] [stderr] Compiling serde v1.0.228 [INFO] [stderr] Compiling linux-raw-sys v0.11.0 [INFO] [stderr] Compiling either v1.15.0 [INFO] [stderr] Compiling syn v2.0.116 [INFO] [stderr] Compiling regex-automata v0.4.14 [INFO] [stderr] Compiling protoc-bin-vendored-linux-s390_64 v3.2.0 [INFO] [stderr] Compiling protoc-bin-vendored-macos-aarch_64 v3.2.0 [INFO] [stderr] Compiling protoc-bin-vendored-linux-aarch_64 v3.2.0 [INFO] [stderr] Compiling protoc-bin-vendored-win32 v3.2.0 [INFO] [stderr] Compiling protoc-bin-vendored-linux-x86_32 v3.2.0 [INFO] [stderr] Compiling rust_decimal v1.40.0 [INFO] [stderr] Compiling protoc-bin-vendored-linux-x86_64 v3.2.0 [INFO] [stderr] Compiling protoc-bin-vendored-linux-ppcle_64 v3.2.0 [INFO] [stderr] Compiling protoc-bin-vendored-macos-x86_64 v3.2.0 [INFO] [stderr] Checking deranged v0.5.6 [INFO] [stderr] Checking phf_shared v0.12.1 [INFO] [stderr] Checking regex-syntax v0.8.9 [INFO] [stderr] Checking time-core v0.1.8 [INFO] [stderr] Checking num-conv v0.2.0 [INFO] [stderr] Compiling chrono-tz v0.10.4 [INFO] [stderr] Checking phf v0.12.1 [INFO] [stderr] Compiling protoc-bin-vendored v3.2.0 [INFO] [stderr] Checking serde_json v1.0.149 [INFO] [stderr] Checking uom v0.38.0 [INFO] [stderr] Checking time v0.3.47 [INFO] [stderr] Compiling tempfile v3.25.0 [INFO] [stderr] Compiling which v4.4.2 [INFO] [stderr] Compiling regex v1.12.3 [INFO] [stderr] Compiling darling_core v0.21.3 [INFO] [stderr] Compiling test-case-core v3.3.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Compiling thiserror-impl v2.0.18 [INFO] [stderr] Compiling rscel-macro v1.0.8 [INFO] [stderr] Compiling test-case-macros v3.3.1 [INFO] [stderr] Checking test-case v3.3.1 [INFO] [stderr] Compiling thiserror v1.0.69 [INFO] [stderr] Compiling protobuf-support v3.7.2 [INFO] [stderr] Checking thiserror v2.0.18 [INFO] [stderr] Compiling darling_macro v0.21.3 [INFO] [stderr] Compiling darling v0.21.3 [INFO] [stderr] Compiling serde_with_macros v3.16.1 [INFO] [stderr] Checking chrono v0.4.43 [INFO] [stderr] Checking serde_with v3.16.1 [INFO] [stderr] Checking duration-str v0.20.0 [INFO] [stderr] Compiling protobuf-parse v3.7.2 [INFO] [stderr] Compiling protobuf-codegen v3.7.2 [INFO] [stderr] Compiling rscel v1.0.8 (/opt/rustwide/workdir) [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> build.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | if let Ok(_) = env::var("RSCEL_TEST_PROTO") { [INFO] [stdout] | -------^^^^^------------------------------- help: try: `if env::var("RSCEL_TEST_PROTO").is_ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/compiler/compiled_prog.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | use crate::compiler::compiled_prog::{NodeValue, PreResolvedByteCode}; [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/compiler/compiler.rs:463:25 [INFO] [stdout] | [INFO] [stdout] 463 | label: label, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `label` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/context/default_funcs.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | const DEFAULT_FUNCS: &[(&str, &'static RsCelFunction)] = &[ [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&RsCelFunction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/context/default_macros.rs:30:33 [INFO] [stdout] | [INFO] [stdout] 30 | const DEFAULT_MACROS: &[(&str, &'static RsCelMacro)] = &[ [INFO] [stdout] | -^^^^^^^----------- help: consider removing `'static`: `&RsCelMacro` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/context/default_macros.rs:44:33 [INFO] [stdout] | [INFO] [stdout] 44 | const COMPILE_MACROS: &[(&str, &'static RsCelMacro)] = &[ [INFO] [stdout] | -^^^^^^^----------- help: consider removing `'static`: `&RsCelMacro` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `crate` references the macro call's crate [INFO] [stdout] --> src/compiler/compiled_prog.rs:22:17 [INFO] [stdout] | [INFO] [stdout] 22 | use crate::compiler::compiled_prog::{NodeValue, PreResolvedByteCode}; [INFO] [stdout] | ^^^^^ help: to reference the macro definition's crate, use: `$crate` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#crate_in_macro_def [INFO] [stdout] = note: `#[warn(clippy::crate_in_macro_def)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/compiler/compiler.rs:463:25 [INFO] [stdout] | [INFO] [stdout] 463 | label: label, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `label` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/context/default_funcs.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | const DEFAULT_FUNCS: &[(&str, &'static RsCelFunction)] = &[ [INFO] [stdout] | -^^^^^^^-------------- help: consider removing `'static`: `&RsCelFunction` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] = note: `#[warn(clippy::redundant_static_lifetimes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/context/default_macros.rs:30:33 [INFO] [stdout] | [INFO] [stdout] 30 | const DEFAULT_MACROS: &[(&str, &'static RsCelMacro)] = &[ [INFO] [stdout] | -^^^^^^^----------- help: consider removing `'static`: `&RsCelMacro` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/context/default_macros.rs:44:33 [INFO] [stdout] | [INFO] [stdout] 44 | const COMPILE_MACROS: &[(&str, &'static RsCelMacro)] = &[ [INFO] [stdout] | -^^^^^^^----------- help: consider removing `'static`: `&RsCelMacro` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/tests/general_tests.rs:604:20 [INFO] [stdout] | [INFO] [stdout] 604 | .ymd(2024, 01, 10) [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] = note: `#[warn(clippy::zero_prefixed_literal)]` on by default [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 604 - .ymd(2024, 01, 10) [INFO] [stdout] 604 + .ymd(2024, 1, 10) [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 604 | .ymd(2024, 0o1, 10) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this is a decimal constant [INFO] [stdout] --> src/tests/general_tests.rs:648:20 [INFO] [stdout] | [INFO] [stdout] 648 | .ymd(2024, 01, 10) [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stdout] help: if you mean to use a decimal constant, remove the `0` to avoid confusion [INFO] [stdout] | [INFO] [stdout] 648 - .ymd(2024, 01, 10) [INFO] [stdout] 648 + .ymd(2024, 1, 10) [INFO] [stdout] | [INFO] [stdout] help: if you mean to use an octal constant, use `0o` [INFO] [stdout] | [INFO] [stdout] 648 | .ymd(2024, 0o1, 10) [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/compiled_prog.rs:143:22 [INFO] [stdout] | [INFO] [stdout] 143 | .map(|c| c.inner.into_bytecode().into_iter()) [INFO] [stdout] | ______________________^ [INFO] [stdout] 144 | | .flatten() [INFO] [stdout] | |______________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|c| c.inner.into_bytecode().into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/compiled_prog.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 227 | let r = self.append_result(child); [INFO] [stdout] | ---------------------------------- unnecessary `let` binding [INFO] [stdout] 228 | r [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 227 ~ [INFO] [stdout] 228 ~ self.append_result(child) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/compiler/mod.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | pub mod compiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/compiler.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | if !self.tokenizer.peek()?.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.tokenizer.peek()?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/compiler/compiler.rs:163:29 [INFO] [stdout] | [INFO] [stdout] 163 | / ... [PreResolvedCodePoint::JmpCond { [INFO] [stdout] 164 | | ... when: JmpWhen::False, [INFO] [stdout] 165 | | ... label: after_true_clause, [INFO] [stdout] 166 | | ... }] [INFO] [stdout] 167 | | ... .into_iter(), [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 166 - }] [INFO] [stdout] 167 - .into_iter(), [INFO] [stdout] 166 + }], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/compiler/compiler.rs:171:29 [INFO] [stdout] | [INFO] [stdout] 171 | / ... [ [INFO] [stdout] 172 | | ... PreResolvedCodePoint::Jmp { label: end_label }, [INFO] [stdout] 173 | | ... PreResolvedCodePoint::Label(after_true_clause), [INFO] [stdout] 174 | | ... ] [INFO] [stdout] 175 | | ... .into_iter(), [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 174 - ] [INFO] [stdout] 175 - .into_iter(), [INFO] [stdout] 174 + ], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/compiler/compiler.rs:178:32 [INFO] [stdout] | [INFO] [stdout] 178 | .chain([PreResolvedCodePoint::Label(end_label)].into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 178 - .chain([PreResolvedCodePoint::Label(end_label)].into_iter()) [INFO] [stdout] 178 + .chain([PreResolvedCodePoint::Label(end_label)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/compiler.rs:229:35 [INFO] [stdout] | [INFO] [stdout] 229 | .with_message(format!("Expected COMMA")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expected COMMA".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/compiler/compiler.rs:408:9 [INFO] [stdout] | [INFO] [stdout] 408 | / loop { [INFO] [stdout] 409 | | if let Some(Token::OrOr) = self.tokenizer.peek()?.as_token() { [INFO] [stdout] 410 | | self.tokenizer.next()?; [INFO] [stdout] 411 | | let (rhs_node, rhs_ast) = self.parse_conditional_and()?; [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(Token::OrOr) = self.tokenizer.peek()?.as_token() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/compiler/compiler.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | / loop { [INFO] [stdout] 454 | | if let Some(Token::AndAnd) = self.tokenizer.peek()?.as_token() { [INFO] [stdout] 455 | | self.tokenizer.next()?; [INFO] [stdout] 456 | | let (rhs_node, rhs_ast) = self.parse_relation()?; [INFO] [stdout] ... | [INFO] [stdout] 486 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(Token::AndAnd) = self.tokenizer.peek()?.as_token() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:927:25 [INFO] [stdout] | [INFO] [stdout] 927 | let r = ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:940:48 [INFO] [stdout] | [INFO] [stdout] 940 | ... match o.access(&s) { [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:995:37 [INFO] [stdout] | [INFO] [stdout] 995 | ... let r = last_ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `interp::types::bytecode::ByteCode` [INFO] [stdout] --> src/compiler/compiler.rs:1041:34 [INFO] [stdout] | [INFO] [stdout] 1041 | ... vec![ByteCode::Access.into()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ByteCode::Access` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:1045:56 [INFO] [stdout] | [INFO] [stdout] 1045 | ... match o.access(&s) { [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:1060:33 [INFO] [stdout] | [INFO] [stdout] 1060 | let r = last_ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `interp::types::bytecode::ByteCode` [INFO] [stdout] --> src/compiler/compiler.rs:1105:34 [INFO] [stdout] | [INFO] [stdout] 1105 | ... vec![ByteCode::Access.into()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ByteCode::Access` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:1109:56 [INFO] [stdout] | [INFO] [stdout] 1109 | ... match o.access(&s) { [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:1124:33 [INFO] [stdout] | [INFO] [stdout] 1124 | let r = last_ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/compiler.rs:1225:39 [INFO] [stdout] | [INFO] [stdout] 1225 | .with_message(format!("Unexpected token, expected RBRACKET",)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected token, expected RBRACKET".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/compiler.rs:1265:39 [INFO] [stdout] | [INFO] [stdout] 1265 | .with_message(format!("Unexpected token, expected RBRACE",)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected token, expected RBRACE".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:1378:71 [INFO] [stdout] | [INFO] [stdout] 1378 | ... let mut tok = StringTokenizer::with_input(&e); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/compiler/compiler.rs:1438:21 [INFO] [stdout] | [INFO] [stdout] 1438 | / if *val == ending { [INFO] [stdout] 1439 | | break 'outer; [INFO] [stdout] 1440 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1437 ~ Some(val) [INFO] [stdout] 1438 ~ if *val == ending => { [INFO] [stdout] 1439 | break 'outer; [INFO] [stdout] 1440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/compiler.rs:1436:13 [INFO] [stdout] | [INFO] [stdout] 1436 | / match self.tokenizer.peek()?.as_token() { [INFO] [stdout] 1437 | | Some(val) => { [INFO] [stdout] 1438 | | if *val == ending { [INFO] [stdout] 1439 | | break 'outer; [INFO] [stdout] ... | [INFO] [stdout] 1442 | | None => {} [INFO] [stdout] 1443 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1436 ~ if let Some(val) = self.tokenizer.peek()?.as_token() { [INFO] [stdout] 1437 + if *val == ending { [INFO] [stdout] 1438 + break 'outer; [INFO] [stdout] 1439 + } [INFO] [stdout] 1440 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/compiler/grammar.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / pub enum MatchPattern { [INFO] [stdout] 42 | |/ Cmp { [INFO] [stdout] 43 | || op: AstNode, [INFO] [stdout] 44 | || or: AstNode, [INFO] [stdout] 45 | || }, [INFO] [stdout] | ||_____- the largest variant contains at least 496 bytes [INFO] [stdout] 46 | | Type(AstNode), [INFO] [stdout] | | ------------------------------- the second-largest variant contains at least 40 bytes [INFO] [stdout] 47 | | Any(AstNode), [INFO] [stdout] 48 | | } [INFO] [stdout] | |__^ the entire enum is at least 496 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 44 - or: AstNode, [INFO] [stdout] 44 + or: Box>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/compiler/string_tokenizer.rs:64:28 [INFO] [stdout] | [INFO] [stdout] 64 | if v >= '0' && v <= '9' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:209:41 [INFO] [stdout] | [INFO] [stdout] 209 | 'n' => working.push('\n' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\n'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:210:41 [INFO] [stdout] | [INFO] [stdout] 210 | 'r' => working.push('\r' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\r'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:211:41 [INFO] [stdout] | [INFO] [stdout] 211 | 't' => working.push('\t' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\t'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:215:42 [INFO] [stdout] | [INFO] [stdout] 215 | '\\' => working.push('\\' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\\'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:216:42 [INFO] [stdout] | [INFO] [stdout] 216 | '\'' => working.push('\'' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\''` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:217:41 [INFO] [stdout] | [INFO] [stdout] 217 | '"' => working.push('"' as u8), [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'"'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/string_tokenizer.rs:225:55 [INFO] [stdout] | [INFO] [stdout] 225 | ... .with_message(format!("Octal number requires 3 digits"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Octal number requires 3 digits".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/string_tokenizer.rs:301:55 [INFO] [stdout] | [INFO] [stdout] 301 | ... .with_message(format!("Octal number requires 3 digits"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Octal number requires 3 digits".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/string_tokenizer.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | return Ok(Some(ident.1.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 424 - return Ok(Some(ident.1.clone())); [INFO] [stdout] 424 + Ok(Some(ident.1.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/string_tokenizer.rs:426:13 [INFO] [stdout] | [INFO] [stdout] 426 | return Ok(Some(Token::Ident(working))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 426 - return Ok(Some(Token::Ident(working))); [INFO] [stdout] 426 + Ok(Some(Token::Ident(working))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/compiler/string_tokenizer.rs:449:52 [INFO] [stdout] | [INFO] [stdout] 449 | if next == '.' && is_float { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 450 | | break 'outer; [INFO] [stdout] 451 | | } else if is_exp { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/compiler/string_tokenizer.rs:451:42 [INFO] [stdout] | [INFO] [stdout] 451 | } else if is_exp { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 452 | | break 'outer; [INFO] [stdout] 453 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/compiler/string_tokenizer.rs:534:24 [INFO] [stdout] | [INFO] [stdout] 534 | if c.is_digit(16) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/compiler/string_tokenizer.rs:580:23 [INFO] [stdout] | [INFO] [stdout] 580 | let tmp = std::mem::replace(&mut self.current, None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.current.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/compiler/string_tokenizer.rs:585:15 [INFO] [stdout] | [INFO] [stdout] 585 | fn source<'a>(&'a self) -> &'a str { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 585 - fn source<'a>(&'a self) -> &'a str { [INFO] [stdout] 585 + fn source(&self) -> &str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/compiler/syntax_error.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn message<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 23 - pub fn message<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] 23 + pub fn message(&self) -> Option<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/compiler/tokenizer.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | fn source<'a>(&'a self) -> &'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 18 - fn source<'a>(&'a self) -> &'a str; [INFO] [stdout] 18 + fn source(&self) -> &str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/compiler/tokenizer.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / match self { [INFO] [stdout] 60 | | Some(t) => Some(t.into_token()), [INFO] [stdout] 61 | | None => None, [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________^ help: try: `self.map(|t| t.into_token())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BindContext<'a>` [INFO] [stdout] --> src/context/bind_context.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | / pub fn new() -> BindContext<'a> { [INFO] [stdout] 68 | | let mut ctx = BindContext { [INFO] [stdout] 69 | | params: HashMap::new(), [INFO] [stdout] 70 | | funcs: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 78 | | ctx [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 65 + impl<'a> Default for BindContext<'a> { [INFO] [stdout] 66 + fn default() -> Self { [INFO] [stdout] 67 + Self::new() [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Some` and `?` operator are unneeded [INFO] [stdout] --> src/context/bind_context.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | Some(self.params.get(name)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Some` and `?` operator [INFO] [stdout] | [INFO] [stdout] 132 - Some(self.params.get(name)?) [INFO] [stdout] 132 + self.params.get(name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/match_captures.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] 32 + CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/match_replace.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] 22 + CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/match_replace_once.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] 22 + CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/matches.rs:20:27 [INFO] [stdout] | [INFO] [stdout] 20 | Ok(re) => return Ok(re.is_match(haystack)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 20 - Ok(re) => return Ok(re.is_match(haystack)), [INFO] [stdout] 20 + Ok(re) => Ok(re.is_match(haystack)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/matches.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | / return Err(CelError::value(&format!( [INFO] [stdout] 23 | | "Invalid regular expression: {}", [INFO] [stdout] 24 | | err [INFO] [stdout] 25 | | ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 ~ Err(CelError::value(&format!( [INFO] [stdout] 23 + "Invalid regular expression: {}", [INFO] [stdout] 24 + err [INFO] [stdout] 25 + ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/remove.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod remove { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn remove(mut this: String, pattern: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 14 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/replace.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod replace { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn replace(this: String, needle: String, to: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/split.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / mod split { [INFO] [stdout] 18 | | use crate::CelValue; [INFO] [stdout] 19 | | [INFO] [stdout] 20 | | fn split(this: String, needle: String) -> Vec { [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/context/default_funcs/string/split.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | vec![left.into(), right.into()].into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `vec![left.into(), right.into()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/context/default_funcs/string/split.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | vec![left.into(), right.into()].into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `vec![left.into(), right.into()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/trim_end_matches.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod trim_end_matches { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn trim_end_matches(this: String, pattern: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/trim_start_matches.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod trim_start_matches { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn trim_start_matches(this: String, pattern: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/context/default_funcs/string.rs:91:18 [INFO] [stdout] | [INFO] [stdout] 91 | let padded = std::iter::repeat(pad_char) [INFO] [stdout] | __________________^ [INFO] [stdout] 92 | | .take(pad_count) [INFO] [stdout] | |________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(pad_char, pad_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/context/default_funcs/string.rs:143:16 [INFO] [stdout] | [INFO] [stdout] 143 | .chain(std::iter::repeat(pad_char).take(pad_count)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(pad_char, pad_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/context/default_funcs/time_funcs/get_minutes.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | this.num_minutes() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `this.num_minutes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/context/default_funcs/time_funcs/get_seconds.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | this.num_seconds() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `this.num_seconds()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/context/default_funcs/uom.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | uom_convert_internal(base as f64, &from, &to) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `base` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:162:18 [INFO] [stdout] | [INFO] [stdout] 162 | fn from_mass(self, mass: Mass) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | fn from_volume(self, volume: Volume) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:254:22 [INFO] [stdout] | [INFO] [stdout] 254 | fn from_velocity(self, velocity: Velocity) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:283:25 [INFO] [stdout] | [INFO] [stdout] 283 | fn from_temperature(self, temp: ThermodynamicTemperature) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/context/default_macros/has.rs:10:23 [INFO] [stdout] | [INFO] [stdout] 10 | match ctx.run_raw(&exprlist[0], true) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `exprlist[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CelContext` [INFO] [stdout] --> src/context/mod.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> CelContext { [INFO] [stdout] 26 | | CelContext { [INFO] [stdout] 27 | | progs: HashMap::new(), [INFO] [stdout] 28 | | } [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for CelContext { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/context/mod.rs:65:39 [INFO] [stdout] | [INFO] [stdout] 65 | let interp = Interpreter::new(&self, bindings); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/interp/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod interp; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:50:84 [INFO] [stdout] | [INFO] [stdout] 50 | ... return self.ctx.run_raw(prog.bytecode(), true).map(|x| x.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:54:24 [INFO] [stdout] | [INFO] [stdout] 54 | Ok(CelValue::from_err(CelError::binding(&name)).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `CelValue::from_err(CelError::binding(&name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/interp/interp.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | None => Err(CelError::binding(&name)), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:327:41 [INFO] [stdout] | [INFO] [stdout] 327 | / ... CelValue::from_err(CelError::attribute( [INFO] [stdout] 328 | | ... "obj", [INFO] [stdout] 329 | | ... ident.as_str(), [INFO] [stdout] 330 | | ... )) [INFO] [stdout] 331 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 327 ~ CelValue::from_err(CelError::attribute( [INFO] [stdout] 328 + "obj", [INFO] [stdout] 329 + ident.as_str(), [INFO] [stdout] 330 ~ )), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | / ... CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 353 | | ... "Access operator invalid between {:?} and IDENT", [INFO] [stdout] 354 | | ... obj.as_type(), [INFO] [stdout] 355 | | ... ))) [INFO] [stdout] 356 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 352 ~ CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 353 + "Access operator invalid between {:?} and IDENT", [INFO] [stdout] 354 + obj.as_type(), [INFO] [stdout] 355 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:362:29 [INFO] [stdout] | [INFO] [stdout] 362 | / ... CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 363 | | ... "Access operator invalid between {:?} and {:?}", [INFO] [stdout] 364 | | ... obj_type, [INFO] [stdout] 365 | | ... index.as_type(), [INFO] [stdout] 366 | | ... ))) [INFO] [stdout] 367 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 362 ~ CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 363 + "Access operator invalid between {:?} and {:?}", [INFO] [stdout] 364 + obj_type, [INFO] [stdout] 365 + index.as_type(), [INFO] [stdout] 366 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:401:29 [INFO] [stdout] | [INFO] [stdout] 401 | / ... CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 402 | | ... "{:?} cannot be called", [INFO] [stdout] 403 | | ... other [INFO] [stdout] 404 | | ... ))) [INFO] [stdout] 405 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 401 ~ CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 402 + "{:?} cannot be called", [INFO] [stdout] 403 + other [INFO] [stdout] 404 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:448:29 [INFO] [stdout] | [INFO] [stdout] 448 | / ... CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 449 | | ... "{:?} cannot be called", [INFO] [stdout] 450 | | ... other [INFO] [stdout] 451 | | ... ))) [INFO] [stdout] 452 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 448 ~ CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 449 + "{:?} cannot be called", [INFO] [stdout] 450 + other [INFO] [stdout] 451 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/interp/interp.rs:491:15 [INFO] [stdout] | [INFO] [stdout] 491 | args: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 491 - args: &Vec, [INFO] [stdout] 491 + args: &[CelValue], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ProgramDetails` [INFO] [stdout] --> src/program/program_details.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> ProgramDetails { [INFO] [stdout] 21 | | ProgramDetails { [INFO] [stdout] 22 | | source: None, [INFO] [stdout] 23 | | params: HashSet::new(), [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 + impl Default for ProgramDetails { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/program_details.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 47 - pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] 47 + pub fn ast(&self) -> Option<&AstNode> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/program_details.rs:51:19 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 51 - pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] 51 + pub fn source(&self) -> Option<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/program_details.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 59 - pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] 59 + pub fn params(&self) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 - pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] 26 + pub fn params(&self) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:30:19 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 30 - pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] 30 + pub fn source(&self) -> Option<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn details<'a>(&'a self) -> &'a ProgramDetails { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 38 - pub fn details<'a>(&'a self) -> &'a ProgramDetails { [INFO] [stdout] 38 + pub fn details(&self) -> &ProgramDetails { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn details_mut<'a>(&'a mut self) -> &'a mut ProgramDetails { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 42 - pub fn details_mut<'a>(&'a mut self) -> &'a mut ProgramDetails { [INFO] [stdout] 42 + pub fn details_mut(&mut self) -> &mut ProgramDetails { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn bytecode<'a>(&'a self) -> &'a CelByteCode { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 46 - pub fn bytecode<'a>(&'a self) -> &'a CelByteCode { [INFO] [stdout] 46 + pub fn bytecode(&self) -> &CelByteCode { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:60:16 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 60 - pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] 60 + pub fn ast(&self) -> Option<&AstNode> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/types/cel_byte_code.rs:61:1 [INFO] [stdout] | [INFO] [stdout] 61 | impl Into> for CelByteCode { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 61 ~ impl From for Vec { [INFO] [stdout] 62 ~ fn from(val: CelByteCode) -> Self { [INFO] [stdout] 63 ~ val.inner [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/types/cel_bytes.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | self.inner.extend(bytes.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 29 - self.inner.extend(bytes.into_iter()); [INFO] [stdout] 29 + self.inner.extend(bytes); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/types/cel_bytes.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | impl Into> for CelBytes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 43 ~ impl From for Vec { [INFO] [stdout] 44 ~ fn from(val: CelBytes) -> Self { [INFO] [stdout] 45 ~ val.inner [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/cel_value.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / pub fn from_str(val: &str) -> CelValue { [INFO] [stdout] 105 | | CelValue::String(val.to_owned()) [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/types/cel_value.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | / if let CelValue::Err(_) = self { [INFO] [stdout] 221 | | true [INFO] [stdout] 222 | | } else { [INFO] [stdout] 223 | | false [INFO] [stdout] 224 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 220 - if let CelValue::Err(_) = self { [INFO] [stdout] 221 - true [INFO] [stdout] 222 - } else { [INFO] [stdout] 223 - false [INFO] [stdout] 224 - } [INFO] [stdout] 220 + matches!(self, CelValue::Err(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/types/cel_value.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 228 | / match self { [INFO] [stdout] 229 | | CelValue::Map(_) => true, [INFO] [stdout] 230 | | CelValue::Dyn(_) => true, [INFO] [stdout] 231 | | _ => false, [INFO] [stdout] 232 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 228 - match self { [INFO] [stdout] 229 - CelValue::Map(_) => true, [INFO] [stdout] 230 - CelValue::Dyn(_) => true, [INFO] [stdout] 231 - _ => false, [INFO] [stdout] 232 - } [INFO] [stdout] 228 + matches!(self, CelValue::Map(_) | CelValue::Dyn(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/types/cel_value.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | / if let CelValue::Null = self { [INFO] [stdout] 320 | | true [INFO] [stdout] 321 | | } else { [INFO] [stdout] 322 | | false [INFO] [stdout] 323 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 319 - if let CelValue::Null = self { [INFO] [stdout] 320 - true [INFO] [stdout] 321 - } else { [INFO] [stdout] 322 - false [INFO] [stdout] 323 - } [INFO] [stdout] 319 + matches!(self, CelValue::Null) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:559:21 [INFO] [stdout] | [INFO] [stdout] 559 | return list[index as usize].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 559 - return list[index as usize].clone(); [INFO] [stdout] 559 + list[index as usize].clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:583:29 [INFO] [stdout] | [INFO] [stdout] 583 | / ... return CelValue::from_err(CelError::value( [INFO] [stdout] 584 | | ... "Negative index is not allowed", [INFO] [stdout] 585 | | ... )); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 583 ~ CelValue::from_err(CelError::value( [INFO] [stdout] 584 + "Negative index is not allowed", [INFO] [stdout] 585 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:597:21 [INFO] [stdout] | [INFO] [stdout] 597 | / return CelValue::from_err(CelError::value( [INFO] [stdout] 598 | | "List index can only be int or uint", [INFO] [stdout] 599 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 597 ~ CelValue::from_err(CelError::value( [INFO] [stdout] 598 + "List index can only be int or uint", [INFO] [stdout] 599 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:605:38 [INFO] [stdout] | [INFO] [stdout] 605 | Some(val) => return val.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 605 - Some(val) => return val.clone(), [INFO] [stdout] 605 + Some(val) => val.clone(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:607:29 [INFO] [stdout] | [INFO] [stdout] 607 | ... return CelValue::from_err(CelError::attribute("obj", &index)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 607 - return CelValue::from_err(CelError::attribute("obj", &index)); [INFO] [stdout] 607 + CelValue::from_err(CelError::attribute("obj", &index)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:619:21 [INFO] [stdout] | [INFO] [stdout] 619 | return d.access(&index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 619 - return d.access(&index); [INFO] [stdout] 619 + d.access(&index) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/cel_value.rs:659:38 [INFO] [stdout] | [INFO] [stdout] 659 | } => CelValue::enum_type(&descriptor), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `descriptor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/types/cel_value.rs:796:32 [INFO] [stdout] | [INFO] [stdout] 796 | if let Some(_) = l_desc.value_by_name(&strval) { [INFO] [stdout] | -------^^^^^^^-------------------------------- help: try: `if l_desc.value_by_name(&strval).is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types/cel_value.rs:818:36 [INFO] [stdout] | [INFO] [stdout] 818 | CelValue::String(s) => s.len() != 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types/cel_value.rs:820:34 [INFO] [stdout] | [INFO] [stdout] 820 | CelValue::List(l) => l.len() != 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types/cel_value.rs:821:33 [INFO] [stdout] | [INFO] [stdout] 821 | CelValue::Map(m) => m.len() != 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!m.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/types/cel_value.rs:839:16 [INFO] [stdout] | [INFO] [stdout] 839 | fn any_ref<'a>(&'a self) -> &'a dyn Any { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 839 - fn any_ref<'a>(&'a self) -> &'a dyn Any { [INFO] [stdout] 839 + fn any_ref(&self) -> &dyn Any { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/cel_value.rs:865:58 [INFO] [stdout] | [INFO] [stdout] 865 | let list: Vec = val.iter().map(|x| CelValue::from(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `CelValue::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/cel_value.rs:903:58 [INFO] [stdout] | [INFO] [stdout] 903 | let list: Vec = val.iter().map(|x| CelValue::from(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `CelValue::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/types/cel_value_dyn.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | fn any_ref<'a>(&'a self) -> &'a dyn Any; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 13 - fn any_ref<'a>(&'a self) -> &'a dyn Any; [INFO] [stdout] 13 + fn any_ref(&self) -> &dyn Any; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ScopedCounter` [INFO] [stdout] --> src/utils/scoped_counter.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn new() -> ScopedCounter { [INFO] [stdout] 13 | | ScopedCounter { [INFO] [stdout] 14 | | count: RefCell::new(0), [INFO] [stdout] 15 | | } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 11 + impl Default for ScopedCounter { [INFO] [stdout] 12 + fn default() -> Self { [INFO] [stdout] 13 + Self::new() [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(..).flatten()` on `Iterator` [INFO] [stdout] --> src/compiler/compiled_prog.rs:143:22 [INFO] [stdout] | [INFO] [stdout] 143 | .map(|c| c.inner.into_bytecode().into_iter()) [INFO] [stdout] | ______________________^ [INFO] [stdout] 144 | | .flatten() [INFO] [stdout] | |______________________________^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|c| c.inner.into_bytecode().into_iter())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten [INFO] [stdout] = note: `#[warn(clippy::map_flatten)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/compiler/compiled_prog.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 227 | let r = self.append_result(child); [INFO] [stdout] | ---------------------------------- unnecessary `let` binding [INFO] [stdout] 228 | r [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stdout] = note: `#[warn(clippy::let_and_return)]` on by default [INFO] [stdout] help: return the expression directly [INFO] [stdout] | [INFO] [stdout] 227 ~ [INFO] [stdout] 228 ~ self.append_result(child) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/compiled_prog.rs:321:13 [INFO] [stdout] | [INFO] [stdout] 321 | return prog.is_const() || prog.bytecode_len() == 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 321 - return prog.is_const() || prog.bytecode_len() == 0; [INFO] [stdout] 321 + prog.is_const() || prog.bytecode_len() == 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/compiler/compiled_prog.rs:345:13 [INFO] [stdout] | [INFO] [stdout] 345 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/compiler/mod.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | pub mod compiler; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/compiler/compiler.rs:42:12 [INFO] [stdout] | [INFO] [stdout] 42 | if !self.tokenizer.peek()?.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `self.tokenizer.peek()?.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/compiler/compiler.rs:163:29 [INFO] [stdout] | [INFO] [stdout] 163 | / ... [PreResolvedCodePoint::JmpCond { [INFO] [stdout] 164 | | ... when: JmpWhen::False, [INFO] [stdout] 165 | | ... label: after_true_clause, [INFO] [stdout] 166 | | ... }] [INFO] [stdout] 167 | | ... .into_iter(), [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 166 - }] [INFO] [stdout] 167 - .into_iter(), [INFO] [stdout] 166 + }], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/compiler/compiler.rs:171:29 [INFO] [stdout] | [INFO] [stdout] 171 | / ... [ [INFO] [stdout] 172 | | ... PreResolvedCodePoint::Jmp { label: end_label }, [INFO] [stdout] 173 | | ... PreResolvedCodePoint::Label(after_true_clause), [INFO] [stdout] 174 | | ... ] [INFO] [stdout] 175 | | ... .into_iter(), [INFO] [stdout] | |__________________________________^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 174 - ] [INFO] [stdout] 175 - .into_iter(), [INFO] [stdout] 174 + ], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/compiler/compiler.rs:178:32 [INFO] [stdout] | [INFO] [stdout] 178 | .chain([PreResolvedCodePoint::Label(end_label)].into_iter()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/iterator.rs:510:11 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 178 - .chain([PreResolvedCodePoint::Label(end_label)].into_iter()) [INFO] [stdout] 178 + .chain([PreResolvedCodePoint::Label(end_label)]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/compiler.rs:229:35 [INFO] [stdout] | [INFO] [stdout] 229 | .with_message(format!("Expected COMMA")) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Expected COMMA".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/compiler/compiler.rs:408:9 [INFO] [stdout] | [INFO] [stdout] 408 | / loop { [INFO] [stdout] 409 | | if let Some(Token::OrOr) = self.tokenizer.peek()?.as_token() { [INFO] [stdout] 410 | | self.tokenizer.next()?; [INFO] [stdout] 411 | | let (rhs_node, rhs_ast) = self.parse_conditional_and()?; [INFO] [stdout] ... | [INFO] [stdout] 441 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(Token::OrOr) = self.tokenizer.peek()?.as_token() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] = note: `#[warn(clippy::while_let_loop)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this loop could be written as a `while let` loop [INFO] [stdout] --> src/compiler/compiler.rs:453:9 [INFO] [stdout] | [INFO] [stdout] 453 | / loop { [INFO] [stdout] 454 | | if let Some(Token::AndAnd) = self.tokenizer.peek()?.as_token() { [INFO] [stdout] 455 | | self.tokenizer.next()?; [INFO] [stdout] 456 | | let (rhs_node, rhs_ast) = self.parse_relation()?; [INFO] [stdout] ... | [INFO] [stdout] 486 | | } [INFO] [stdout] | |_________^ help: try: `while let Some(Token::AndAnd) = self.tokenizer.peek()?.as_token() { .. }` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_loop [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:927:25 [INFO] [stdout] | [INFO] [stdout] 927 | let r = ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] = note: `#[warn(clippy::clone_on_copy)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:940:48 [INFO] [stdout] | [INFO] [stdout] 940 | ... match o.access(&s) { [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:995:37 [INFO] [stdout] | [INFO] [stdout] 995 | ... let r = last_ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `interp::types::bytecode::ByteCode` [INFO] [stdout] --> src/compiler/compiler.rs:1041:34 [INFO] [stdout] | [INFO] [stdout] 1041 | ... vec![ByteCode::Access.into()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ByteCode::Access` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:1045:56 [INFO] [stdout] | [INFO] [stdout] 1045 | ... match o.access(&s) { [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:1060:33 [INFO] [stdout] | [INFO] [stdout] 1060 | let r = last_ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `interp::types::bytecode::ByteCode` [INFO] [stdout] --> src/compiler/compiler.rs:1105:34 [INFO] [stdout] | [INFO] [stdout] 1105 | ... vec![ByteCode::Access.into()], [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `ByteCode::Access` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:1109:56 [INFO] [stdout] | [INFO] [stdout] 1109 | ... match o.access(&s) { [INFO] [stdout] | ^^ help: change this to: `s` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `SourceRange` which implements the `Copy` trait [INFO] [stdout] --> src/compiler/compiler.rs:1124:33 [INFO] [stdout] | [INFO] [stdout] 1124 | let r = last_ident_ast.range().clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `last_ident_ast.range()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/compiler.rs:1225:39 [INFO] [stdout] | [INFO] [stdout] 1225 | .with_message(format!("Unexpected token, expected RBRACKET",)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected token, expected RBRACKET".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/compiler.rs:1265:39 [INFO] [stdout] | [INFO] [stdout] 1265 | .with_message(format!("Unexpected token, expected RBRACE",)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Unexpected token, expected RBRACE".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/compiler/compiler.rs:1378:71 [INFO] [stdout] | [INFO] [stdout] 1378 | ... let mut tok = StringTokenizer::with_input(&e); [INFO] [stdout] | ^^ help: change this to: `e` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/compiler/compiler.rs:1438:21 [INFO] [stdout] | [INFO] [stdout] 1438 | / if *val == ending { [INFO] [stdout] 1439 | | break 'outer; [INFO] [stdout] 1440 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 1437 ~ Some(val) [INFO] [stdout] 1438 ~ if *val == ending => { [INFO] [stdout] 1439 | break 'outer; [INFO] [stdout] 1440 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for destructuring a single pattern. Consider using `if let` [INFO] [stdout] --> src/compiler/compiler.rs:1436:13 [INFO] [stdout] | [INFO] [stdout] 1436 | / match self.tokenizer.peek()?.as_token() { [INFO] [stdout] 1437 | | Some(val) => { [INFO] [stdout] 1438 | | if *val == ending { [INFO] [stdout] 1439 | | break 'outer; [INFO] [stdout] ... | [INFO] [stdout] 1442 | | None => {} [INFO] [stdout] 1443 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1436 ~ if let Some(val) = self.tokenizer.peek()?.as_token() { [INFO] [stdout] 1437 + if *val == ending { [INFO] [stdout] 1438 + break 'outer; [INFO] [stdout] 1439 + } [INFO] [stdout] 1440 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> examples/dumps_ast.rs:156:33 [INFO] [stdout] | [INFO] [stdout] 156 | self.dump_ident(&ident, depth + 1); [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `str::repeat` using iterators [INFO] [stdout] --> examples/dumps_ast.rs:189:31 [INFO] [stdout] | [INFO] [stdout] 189 | let spacing: String = std::iter::repeat(' ').take(depth).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `" ".repeat(depth)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_str_repeat [INFO] [stdout] = note: `#[warn(clippy::manual_str_repeat)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> examples/dumps_ast.rs:189:31 [INFO] [stdout] | [INFO] [stdout] 189 | let spacing: String = std::iter::repeat(' ').take(depth).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(' ', depth)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: large size difference between variants [INFO] [stdout] --> src/compiler/grammar.rs:41:1 [INFO] [stdout] | [INFO] [stdout] 41 | / pub enum MatchPattern { [INFO] [stdout] 42 | |/ Cmp { [INFO] [stdout] 43 | || op: AstNode, [INFO] [stdout] 44 | || or: AstNode, [INFO] [stdout] 45 | || }, [INFO] [stdout] | ||_____- the largest variant contains at least 496 bytes [INFO] [stdout] 46 | | Type(AstNode), [INFO] [stdout] | | ------------------------------- the second-largest variant contains at least 40 bytes [INFO] [stdout] 47 | | Any(AstNode), [INFO] [stdout] 48 | | } [INFO] [stdout] | |__^ the entire enum is at least 496 bytes [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stdout] = note: `#[warn(clippy::large_enum_variant)]` on by default [INFO] [stdout] help: consider boxing the large fields or introducing indirection in some other way to reduce the total size of the enum [INFO] [stdout] | [INFO] [stdout] 44 - or: AstNode, [INFO] [stdout] 44 + or: Box>, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> examples/explain.rs:10:19 [INFO] [stdout] | [INFO] [stdout] 10 | pub children: Vec>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] = note: `#[warn(clippy::vec_box)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `Vec` is already on the heap, the boxing is unnecessary [INFO] [stdout] --> examples/explain.rs:32:31 [INFO] [stdout] | [INFO] [stdout] 32 | fn into_children(self) -> Vec> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try: `Vec` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#vec_box [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> examples/explain.rs:61:9 [INFO] [stdout] | [INFO] [stdout] 61 | let (curr_node, depth) = queue.pop().expect("wut"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 60 ~ while let Some((curr_node, depth)) = queue.pop() { [INFO] [stdout] 61 ~ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> examples/explain.rs:93:5 [INFO] [stdout] | [INFO] [stdout] 93 | Ok(ctx.exec("main", &bind)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Ok` and `?` operator [INFO] [stdout] | [INFO] [stdout] 93 - Ok(ctx.exec("main", &bind)?) [INFO] [stdout] 93 + ctx.exec("main", &bind) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> examples/explain.rs:228:68 [INFO] [stdout] | [INFO] [stdout] 228 | MemberPrime::MemberAccess { ident } => self.dump_ident(&ident), [INFO] [stdout] | ^^^^^^ help: change this to: `ident` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `RangeInclusive::contains` implementation [INFO] [stdout] --> src/compiler/string_tokenizer.rs:64:28 [INFO] [stdout] | [INFO] [stdout] 64 | if v >= '0' && v <= '9' { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: use: `('0'..='9').contains(&v)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] = note: `#[warn(clippy::manual_range_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:209:41 [INFO] [stdout] | [INFO] [stdout] 209 | 'n' => working.push('\n' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\n'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] = note: `#[warn(clippy::char_lit_as_u8)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:210:41 [INFO] [stdout] | [INFO] [stdout] 210 | 'r' => working.push('\r' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\r'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:211:41 [INFO] [stdout] | [INFO] [stdout] 211 | 't' => working.push('\t' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\t'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:215:42 [INFO] [stdout] | [INFO] [stdout] 215 | '\\' => working.push('\\' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\\'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:216:42 [INFO] [stdout] | [INFO] [stdout] 216 | '\'' => working.push('\'' as u8), [INFO] [stdout] | ^^^^^^^^^^ help: use a byte literal instead: `b'\''` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting a character literal to `u8` truncates [INFO] [stdout] --> src/compiler/string_tokenizer.rs:217:41 [INFO] [stdout] | [INFO] [stdout] 217 | '"' => working.push('"' as u8), [INFO] [stdout] | ^^^^^^^^^ help: use a byte literal instead: `b'"'` [INFO] [stdout] | [INFO] [stdout] = note: `char` is four bytes wide, but `u8` is a single byte [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#char_lit_as_u8 [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/string_tokenizer.rs:225:55 [INFO] [stdout] | [INFO] [stdout] 225 | ... .with_message(format!("Octal number requires 3 digits"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Octal number requires 3 digits".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/compiler/string_tokenizer.rs:301:55 [INFO] [stdout] | [INFO] [stdout] 301 | ... .with_message(format!("Octal number requires 3 digits"))) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"Octal number requires 3 digits".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/string_tokenizer.rs:424:13 [INFO] [stdout] | [INFO] [stdout] 424 | return Ok(Some(ident.1.clone())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 424 - return Ok(Some(ident.1.clone())); [INFO] [stdout] 424 + Ok(Some(ident.1.clone())) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/compiler/string_tokenizer.rs:426:13 [INFO] [stdout] | [INFO] [stdout] 426 | return Ok(Some(Token::Ident(working))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 426 - return Ok(Some(Token::Ident(working))); [INFO] [stdout] 426 + Ok(Some(Token::Ident(working))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/compiler/string_tokenizer.rs:449:52 [INFO] [stdout] | [INFO] [stdout] 449 | if next == '.' && is_float { [INFO] [stdout] | ____________________________________________________^ [INFO] [stdout] 450 | | break 'outer; [INFO] [stdout] 451 | | } else if is_exp { [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/compiler/string_tokenizer.rs:451:42 [INFO] [stdout] | [INFO] [stdout] 451 | } else if is_exp { [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 452 | | break 'outer; [INFO] [stdout] 453 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `char::is_digit` with literal radix of 16 [INFO] [stdout] --> src/compiler/string_tokenizer.rs:534:24 [INFO] [stdout] | [INFO] [stdout] 534 | if c.is_digit(16) { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try: `c.is_ascii_hexdigit()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#is_digit_ascii_radix [INFO] [stdout] = note: `#[warn(clippy::is_digit_ascii_radix)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: replacing an `Option` with `None` [INFO] [stdout] --> src/compiler/string_tokenizer.rs:580:23 [INFO] [stdout] | [INFO] [stdout] 580 | let tmp = std::mem::replace(&mut self.current, None); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider `Option::take()` instead: `self.current.take()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#mem_replace_option_with_none [INFO] [stdout] = note: `#[warn(clippy::mem_replace_option_with_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/compiler/string_tokenizer.rs:585:15 [INFO] [stdout] | [INFO] [stdout] 585 | fn source<'a>(&'a self) -> &'a str { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 585 - fn source<'a>(&'a self) -> &'a str { [INFO] [stdout] 585 + fn source(&self) -> &str { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/compiler/syntax_error.rs:23:20 [INFO] [stdout] | [INFO] [stdout] 23 | pub fn message<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 23 - pub fn message<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] 23 + pub fn message(&self) -> Option<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/compiler/tokenizer.rs:18:15 [INFO] [stdout] | [INFO] [stdout] 18 | fn source<'a>(&'a self) -> &'a str; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 18 - fn source<'a>(&'a self) -> &'a str; [INFO] [stdout] 18 + fn source(&self) -> &str; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `Option::map` [INFO] [stdout] --> src/compiler/tokenizer.rs:59:9 [INFO] [stdout] | [INFO] [stdout] 59 | / match self { [INFO] [stdout] 60 | | Some(t) => Some(t.into_token()), [INFO] [stdout] 61 | | None => None, [INFO] [stdout] 62 | | } [INFO] [stdout] | |_________^ help: try: `self.map(|t| t.into_token())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_map [INFO] [stdout] = note: `#[warn(clippy::manual_map)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `BindContext<'a>` [INFO] [stdout] --> src/context/bind_context.rs:67:5 [INFO] [stdout] | [INFO] [stdout] 67 | / pub fn new() -> BindContext<'a> { [INFO] [stdout] 68 | | let mut ctx = BindContext { [INFO] [stdout] 69 | | params: HashMap::new(), [INFO] [stdout] 70 | | funcs: HashMap::new(), [INFO] [stdout] ... | [INFO] [stdout] 78 | | ctx [INFO] [stdout] 79 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] = note: `#[warn(clippy::new_without_default)]` on by default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 65 + impl<'a> Default for BindContext<'a> { [INFO] [stdout] 66 + fn default() -> Self { [INFO] [stdout] 67 + Self::new() [INFO] [stdout] 68 + } [INFO] [stdout] 69 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Some` and `?` operator are unneeded [INFO] [stdout] --> src/context/bind_context.rs:132:9 [INFO] [stdout] | [INFO] [stdout] 132 | Some(self.params.get(name)?) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_question_mark [INFO] [stdout] = note: `#[warn(clippy::needless_question_mark)]` on by default [INFO] [stdout] help: remove the enclosing `Some` and `?` operator [INFO] [stdout] | [INFO] [stdout] 132 - Some(self.params.get(name)?) [INFO] [stdout] 132 + self.params.get(name) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/match_captures.rs:32:21 [INFO] [stdout] | [INFO] [stdout] 32 | return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] 32 + CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/match_replace.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] 22 + CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/match_replace_once.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] 22 + CelError::value(&format!("Invalid regular expression: {}", err)).into() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/matches.rs:20:27 [INFO] [stdout] | [INFO] [stdout] 20 | Ok(re) => return Ok(re.is_match(haystack)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 20 - Ok(re) => return Ok(re.is_match(haystack)), [INFO] [stdout] 20 + Ok(re) => Ok(re.is_match(haystack)), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/context/default_funcs/string/matches.rs:22:21 [INFO] [stdout] | [INFO] [stdout] 22 | / return Err(CelError::value(&format!( [INFO] [stdout] 23 | | "Invalid regular expression: {}", [INFO] [stdout] 24 | | err [INFO] [stdout] 25 | | ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 ~ Err(CelError::value(&format!( [INFO] [stdout] 23 + "Invalid regular expression: {}", [INFO] [stdout] 24 + err [INFO] [stdout] 25 + ))) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/remove.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod remove { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn remove(mut this: String, pattern: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 14 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/replace.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod replace { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn replace(this: String, needle: String, to: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/split.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / mod split { [INFO] [stdout] 18 | | use crate::CelValue; [INFO] [stdout] 19 | | [INFO] [stdout] 20 | | fn split(this: String, needle: String) -> Vec { [INFO] [stdout] ... | [INFO] [stdout] 23 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/context/default_funcs/string/split.rs:32:9 [INFO] [stdout] | [INFO] [stdout] 32 | vec![left.into(), right.into()].into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `vec![left.into(), right.into()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::vec::Vec` [INFO] [stdout] --> src/context/default_funcs/string/split.rs:38:9 [INFO] [stdout] | [INFO] [stdout] 38 | vec![left.into(), right.into()].into() [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `vec![left.into(), right.into()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/trim_end_matches.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod trim_end_matches { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn trim_end_matches(this: String, pattern: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/context/default_funcs/string/trim_start_matches.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | / mod trim_start_matches { [INFO] [stdout] 7 | | use crate::CelValue; [INFO] [stdout] 8 | | [INFO] [stdout] 9 | | fn trim_start_matches(this: String, pattern: String) -> String { [INFO] [stdout] ... | [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/context/default_funcs/string.rs:91:18 [INFO] [stdout] | [INFO] [stdout] 91 | let padded = std::iter::repeat(pad_char) [INFO] [stdout] | __________________^ [INFO] [stdout] 92 | | .take(pad_count) [INFO] [stdout] | |________________________^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(pad_char, pad_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] = note: `#[warn(clippy::manual_repeat_n)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `repeat().take()` can be written more concisely [INFO] [stdout] --> src/context/default_funcs/string.rs:143:16 [INFO] [stdout] | [INFO] [stdout] 143 | .chain(std::iter::repeat(pad_char).take(pad_count)) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `repeat_n()` instead: `std::iter::repeat_n(pad_char, pad_count)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_repeat_n [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/context/default_funcs/time_funcs/get_minutes.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | this.num_minutes() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `this.num_minutes()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] = note: `#[warn(clippy::unnecessary_cast)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`i64` -> `i64`) [INFO] [stdout] --> src/context/default_funcs/time_funcs/get_seconds.rs:23:9 [INFO] [stdout] | [INFO] [stdout] 23 | this.num_seconds() as i64 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `this.num_seconds()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f64` -> `f64`) [INFO] [stdout] --> src/context/default_funcs/uom.rs:32:30 [INFO] [stdout] | [INFO] [stdout] 32 | uom_convert_internal(base as f64, &from, &to) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `base` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:162:18 [INFO] [stdout] | [INFO] [stdout] 162 | fn from_mass(self, mass: Mass) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:214:20 [INFO] [stdout] | [INFO] [stdout] 214 | fn from_volume(self, volume: Volume) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:254:22 [INFO] [stdout] | [INFO] [stdout] 254 | fn from_velocity(self, velocity: Velocity) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `from_*` usually take no `self` [INFO] [stdout] --> src/context/default_funcs/uom.rs:283:25 [INFO] [stdout] | [INFO] [stdout] 283 | fn from_temperature(self, temp: ThermodynamicTemperature) -> f64 { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/context/default_macros/has.rs:10:23 [INFO] [stdout] | [INFO] [stdout] 10 | match ctx.run_raw(&exprlist[0], true) { [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `exprlist[0]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `CelContext` [INFO] [stdout] --> src/context/mod.rs:25:5 [INFO] [stdout] | [INFO] [stdout] 25 | / pub fn new() -> CelContext { [INFO] [stdout] 26 | | CelContext { [INFO] [stdout] 27 | | progs: HashMap::new(), [INFO] [stdout] 28 | | } [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 23 + impl Default for CelContext { [INFO] [stdout] 24 + fn default() -> Self { [INFO] [stdout] 25 + Self::new() [INFO] [stdout] 26 + } [INFO] [stdout] 27 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/context/mod.rs:65:39 [INFO] [stdout] | [INFO] [stdout] 65 | let interp = Interpreter::new(&self, bindings); [INFO] [stdout] | ^^^^^ help: change this to: `self` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/interp/mod.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | mod interp; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:50:84 [INFO] [stdout] | [INFO] [stdout] 50 | ... return self.ctx.run_raw(prog.bytecode(), true).map(|x| x.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `x` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:54:24 [INFO] [stdout] | [INFO] [stdout] 54 | Ok(CelValue::from_err(CelError::binding(&name)).into()) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `.into()`: `CelValue::from_err(CelError::binding(&name))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/interp/interp.rs:125:47 [INFO] [stdout] | [INFO] [stdout] 125 | None => Err(CelError::binding(&name)), [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:327:41 [INFO] [stdout] | [INFO] [stdout] 327 | / ... CelValue::from_err(CelError::attribute( [INFO] [stdout] 328 | | ... "obj", [INFO] [stdout] 329 | | ... ident.as_str(), [INFO] [stdout] 330 | | ... )) [INFO] [stdout] 331 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 327 ~ CelValue::from_err(CelError::attribute( [INFO] [stdout] 328 + "obj", [INFO] [stdout] 329 + ident.as_str(), [INFO] [stdout] 330 ~ )), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:352:33 [INFO] [stdout] | [INFO] [stdout] 352 | / ... CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 353 | | ... "Access operator invalid between {:?} and IDENT", [INFO] [stdout] 354 | | ... obj.as_type(), [INFO] [stdout] 355 | | ... ))) [INFO] [stdout] 356 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 352 ~ CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 353 + "Access operator invalid between {:?} and IDENT", [INFO] [stdout] 354 + obj.as_type(), [INFO] [stdout] 355 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:362:29 [INFO] [stdout] | [INFO] [stdout] 362 | / ... CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 363 | | ... "Access operator invalid between {:?} and {:?}", [INFO] [stdout] 364 | | ... obj_type, [INFO] [stdout] 365 | | ... index.as_type(), [INFO] [stdout] 366 | | ... ))) [INFO] [stdout] 367 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 362 ~ CelValue::from_err(CelError::value(&format!( [INFO] [stdout] 363 + "Access operator invalid between {:?} and {:?}", [INFO] [stdout] 364 + obj_type, [INFO] [stdout] 365 + index.as_type(), [INFO] [stdout] 366 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:401:29 [INFO] [stdout] | [INFO] [stdout] 401 | / ... CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 402 | | ... "{:?} cannot be called", [INFO] [stdout] 403 | | ... other [INFO] [stdout] 404 | | ... ))) [INFO] [stdout] 405 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 401 ~ CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 402 + "{:?} cannot be called", [INFO] [stdout] 403 + other [INFO] [stdout] 404 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/interp/interp.rs:448:29 [INFO] [stdout] | [INFO] [stdout] 448 | / ... CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 449 | | ... "{:?} cannot be called", [INFO] [stdout] 450 | | ... other [INFO] [stdout] 451 | | ... ))) [INFO] [stdout] 452 | | ... .into(), [INFO] [stdout] | |_____________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 448 ~ CelValue::from_err(CelError::runtime(&format!( [INFO] [stdout] 449 + "{:?} cannot be called", [INFO] [stdout] 450 + other [INFO] [stdout] 451 ~ ))), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/interp/interp.rs:491:15 [INFO] [stdout] | [INFO] [stdout] 491 | args: &Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 491 - args: &Vec, [INFO] [stdout] 491 + args: &[CelValue], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ProgramDetails` [INFO] [stdout] --> src/program/program_details.rs:20:5 [INFO] [stdout] | [INFO] [stdout] 20 | / pub fn new() -> ProgramDetails { [INFO] [stdout] 21 | | ProgramDetails { [INFO] [stdout] 22 | | source: None, [INFO] [stdout] 23 | | params: HashSet::new(), [INFO] [stdout] ... | [INFO] [stdout] 26 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 19 + impl Default for ProgramDetails { [INFO] [stdout] 20 + fn default() -> Self { [INFO] [stdout] 21 + Self::new() [INFO] [stdout] 22 + } [INFO] [stdout] 23 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/program_details.rs:47:16 [INFO] [stdout] | [INFO] [stdout] 47 | pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 47 - pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] 47 + pub fn ast(&self) -> Option<&AstNode> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/program_details.rs:51:19 [INFO] [stdout] | [INFO] [stdout] 51 | pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 51 - pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] 51 + pub fn source(&self) -> Option<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/program_details.rs:59:19 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 59 - pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] 59 + pub fn params(&self) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:26:19 [INFO] [stdout] | [INFO] [stdout] 26 | pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 - pub fn params<'a>(&'a self) -> Vec<&'a str> { [INFO] [stdout] 26 + pub fn params(&self) -> Vec<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:30:19 [INFO] [stdout] | [INFO] [stdout] 30 | pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 30 - pub fn source<'a>(&'a self) -> Option<&'a str> { [INFO] [stdout] 30 + pub fn source(&self) -> Option<&str> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:38:20 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn details<'a>(&'a self) -> &'a ProgramDetails { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 38 - pub fn details<'a>(&'a self) -> &'a ProgramDetails { [INFO] [stdout] 38 + pub fn details(&self) -> &ProgramDetails { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:42:24 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn details_mut<'a>(&'a mut self) -> &'a mut ProgramDetails { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 42 - pub fn details_mut<'a>(&'a mut self) -> &'a mut ProgramDetails { [INFO] [stdout] 42 + pub fn details_mut(&mut self) -> &mut ProgramDetails { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:46:21 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn bytecode<'a>(&'a self) -> &'a CelByteCode { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 46 - pub fn bytecode<'a>(&'a self) -> &'a CelByteCode { [INFO] [stdout] 46 + pub fn bytecode(&self) -> &CelByteCode { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/program/mod.rs:60:16 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 60 - pub fn ast<'a>(&'a self) -> Option<&'a AstNode> { [INFO] [stdout] 60 + pub fn ast(&self) -> Option<&AstNode> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/types/cel_byte_code.rs:61:1 [INFO] [stdout] | [INFO] [stdout] 61 | impl Into> for CelByteCode { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] = note: `#[warn(clippy::from_over_into)]` on by default [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 61 ~ impl From for Vec { [INFO] [stdout] 62 ~ fn from(val: CelByteCode) -> Self { [INFO] [stdout] 63 ~ val.inner [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: explicit call to `.into_iter()` in function argument accepting `IntoIterator` [INFO] [stdout] --> src/types/cel_bytes.rs:29:27 [INFO] [stdout] | [INFO] [stdout] 29 | self.inner.extend(bytes.into_iter()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: this parameter accepts any `IntoIterator`, so you don't need to call `.into_iter()` [INFO] [stdout] --> /rustc/91021ccc790478a1a89c003e7d32b8d155ae6aae/library/core/src/iter/traits/collect.rs:416:17 [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing the `.into_iter()` [INFO] [stdout] | [INFO] [stdout] 29 - self.inner.extend(bytes.into_iter()); [INFO] [stdout] 29 + self.inner.extend(bytes); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true [INFO] [stdout] --> src/types/cel_bytes.rs:43:1 [INFO] [stdout] | [INFO] [stdout] 43 | impl Into> for CelBytes { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: `impl From for Foreign` is allowed by the orphan rules, for more information see [INFO] [stdout] https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#from_over_into [INFO] [stdout] help: replace the `Into` implementation with `From` [INFO] [stdout] | [INFO] [stdout] 43 ~ impl From for Vec { [INFO] [stdout] 44 ~ fn from(val: CelBytes) -> Self { [INFO] [stdout] 45 ~ val.inner [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `from_str` can be confused for the standard trait method `std::str::FromStr::from_str` [INFO] [stdout] --> src/types/cel_value.rs:104:5 [INFO] [stdout] | [INFO] [stdout] 104 | / pub fn from_str(val: &str) -> CelValue { [INFO] [stdout] 105 | | CelValue::String(val.to_owned()) [INFO] [stdout] 106 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: consider implementing the trait `std::str::FromStr` or choosing a less ambiguous method name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#should_implement_trait [INFO] [stdout] = note: `#[warn(clippy::should_implement_trait)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/types/cel_value.rs:220:9 [INFO] [stdout] | [INFO] [stdout] 220 | / if let CelValue::Err(_) = self { [INFO] [stdout] 221 | | true [INFO] [stdout] 222 | | } else { [INFO] [stdout] 223 | | false [INFO] [stdout] 224 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 220 - if let CelValue::Err(_) = self { [INFO] [stdout] 221 - true [INFO] [stdout] 222 - } else { [INFO] [stdout] 223 - false [INFO] [stdout] 224 - } [INFO] [stdout] 220 + matches!(self, CelValue::Err(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/types/cel_value.rs:228:9 [INFO] [stdout] | [INFO] [stdout] 228 | / match self { [INFO] [stdout] 229 | | CelValue::Map(_) => true, [INFO] [stdout] 230 | | CelValue::Dyn(_) => true, [INFO] [stdout] 231 | | _ => false, [INFO] [stdout] 232 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 228 - match self { [INFO] [stdout] 229 - CelValue::Map(_) => true, [INFO] [stdout] 230 - CelValue::Dyn(_) => true, [INFO] [stdout] 231 - _ => false, [INFO] [stdout] 232 - } [INFO] [stdout] 228 + matches!(self, CelValue::Map(_) | CelValue::Dyn(_)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `if let .. else` expression looks like `matches!` macro [INFO] [stdout] --> src/types/cel_value.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | / if let CelValue::Null = self { [INFO] [stdout] 320 | | true [INFO] [stdout] 321 | | } else { [INFO] [stdout] 322 | | false [INFO] [stdout] 323 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 319 - if let CelValue::Null = self { [INFO] [stdout] 320 - true [INFO] [stdout] 321 - } else { [INFO] [stdout] 322 - false [INFO] [stdout] 323 - } [INFO] [stdout] 319 + matches!(self, CelValue::Null) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:559:21 [INFO] [stdout] | [INFO] [stdout] 559 | return list[index as usize].clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 559 - return list[index as usize].clone(); [INFO] [stdout] 559 + list[index as usize].clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:583:29 [INFO] [stdout] | [INFO] [stdout] 583 | / ... return CelValue::from_err(CelError::value( [INFO] [stdout] 584 | | ... "Negative index is not allowed", [INFO] [stdout] 585 | | ... )); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 583 ~ CelValue::from_err(CelError::value( [INFO] [stdout] 584 + "Negative index is not allowed", [INFO] [stdout] 585 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:597:21 [INFO] [stdout] | [INFO] [stdout] 597 | / return CelValue::from_err(CelError::value( [INFO] [stdout] 598 | | "List index can only be int or uint", [INFO] [stdout] 599 | | )); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 597 ~ CelValue::from_err(CelError::value( [INFO] [stdout] 598 + "List index can only be int or uint", [INFO] [stdout] 599 ~ )) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:605:38 [INFO] [stdout] | [INFO] [stdout] 605 | Some(val) => return val.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 605 - Some(val) => return val.clone(), [INFO] [stdout] 605 + Some(val) => val.clone(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:607:29 [INFO] [stdout] | [INFO] [stdout] 607 | ... return CelValue::from_err(CelError::attribute("obj", &index)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 607 - return CelValue::from_err(CelError::attribute("obj", &index)); [INFO] [stdout] 607 + CelValue::from_err(CelError::attribute("obj", &index)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types/cel_value.rs:619:21 [INFO] [stdout] | [INFO] [stdout] 619 | return d.access(&index); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 619 - return d.access(&index); [INFO] [stdout] 619 + d.access(&index) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/types/cel_value.rs:659:38 [INFO] [stdout] | [INFO] [stdout] 659 | } => CelValue::enum_type(&descriptor), [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `descriptor` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_some()` [INFO] [stdout] --> src/types/cel_value.rs:796:32 [INFO] [stdout] | [INFO] [stdout] 796 | if let Some(_) = l_desc.value_by_name(&strval) { [INFO] [stdout] | -------^^^^^^^-------------------------------- help: try: `if l_desc.value_by_name(&strval).is_some()` [INFO] [stdout] | [INFO] [stdout] = note: this will change drop order of the result, as well as all temporaries [INFO] [stdout] = note: add `#[allow(clippy::redundant_pattern_matching)]` if this is important [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stdout] = note: `#[warn(clippy::redundant_pattern_matching)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types/cel_value.rs:818:36 [INFO] [stdout] | [INFO] [stdout] 818 | CelValue::String(s) => s.len() != 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!s.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types/cel_value.rs:820:34 [INFO] [stdout] | [INFO] [stdout] 820 | CelValue::List(l) => l.len() != 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!l.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/types/cel_value.rs:821:33 [INFO] [stdout] | [INFO] [stdout] 821 | CelValue::Map(m) => m.len() != 0, [INFO] [stdout] | ^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!m.is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/types/cel_value.rs:839:16 [INFO] [stdout] | [INFO] [stdout] 839 | fn any_ref<'a>(&'a self) -> &'a dyn Any { [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 839 - fn any_ref<'a>(&'a self) -> &'a dyn Any { [INFO] [stdout] 839 + fn any_ref(&self) -> &dyn Any { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/cel_value.rs:865:58 [INFO] [stdout] | [INFO] [stdout] 865 | let list: Vec = val.iter().map(|x| CelValue::from(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `CelValue::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/types/cel_value.rs:903:58 [INFO] [stdout] | [INFO] [stdout] 903 | let list: Vec = val.iter().map(|x| CelValue::from(x)).collect(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the associated function itself: `CelValue::from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/types/cel_value_dyn.rs:13:16 [INFO] [stdout] | [INFO] [stdout] 13 | fn any_ref<'a>(&'a self) -> &'a dyn Any; [INFO] [stdout] | ^^ ^^ ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 13 - fn any_ref<'a>(&'a self) -> &'a dyn Any; [INFO] [stdout] 13 + fn any_ref(&self) -> &dyn Any; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you should consider adding a `Default` implementation for `ScopedCounter` [INFO] [stdout] --> src/utils/scoped_counter.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | / pub fn new() -> ScopedCounter { [INFO] [stdout] 13 | | ScopedCounter { [INFO] [stdout] 14 | | count: RefCell::new(0), [INFO] [stdout] 15 | | } [INFO] [stdout] 16 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default [INFO] [stdout] help: try adding this [INFO] [stdout] | [INFO] [stdout] 11 + impl Default for ScopedCounter { [INFO] [stdout] 12 + fn default() -> Self { [INFO] [stdout] 13 + Self::new() [INFO] [stdout] 14 + } [INFO] [stdout] 15 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `types::cel_value::CelValue` [INFO] [stdout] --> src/tests/general_tests.rs:592:32 [INFO] [stdout] | [INFO] [stdout] 592 | exec.bind_param("my_list", obj.into()); [INFO] [stdout] | ^^^^^^^^^^ help: consider removing `.into()`: `obj` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/tests/general_tests.rs:547:40 [INFO] [stdout] | [INFO] [stdout] 547 | let obj = CelValue::from_val_slice(&vec![obj_map.into()]); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: you can use a slice directly: `&[obj_map.into()]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 30.62s [INFO] running `Command { std: "docker" "inspect" "dd6b746d2dba7e02c18e8bb30d03cd4c8189ac54c3a416122bffec3b6f8f7121", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dd6b746d2dba7e02c18e8bb30d03cd4c8189ac54c3a416122bffec3b6f8f7121", kill_on_drop: false }` [INFO] [stdout] dd6b746d2dba7e02c18e8bb30d03cd4c8189ac54c3a416122bffec3b6f8f7121