[INFO] cloning repository https://github.com/FlySkyPie/biomes-galois-shader [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/FlySkyPie/biomes-galois-shader" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFlySkyPie%2Fbiomes-galois-shader", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFlySkyPie%2Fbiomes-galois-shader'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] b00156adfc053c7896b1174b345aa0eacb3bfdce [INFO] linting FlySkyPie/biomes-galois-shader against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FFlySkyPie%2Fbiomes-galois-shader" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/FlySkyPie/biomes-galois-shader [INFO] finished tweaking git repo https://github.com/FlySkyPie/biomes-galois-shader [INFO] tweaked toml for git repo https://github.com/FlySkyPie/biomes-galois-shader written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/FlySkyPie/biomes-galois-shader 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 git repo https://github.com/FlySkyPie/biomes-galois-shader 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 glsl v7.0.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 8d6e22dbae978cd7c556e71d0f3bc799265132472076fdcf7b5de44d50adeb80 [INFO] running `Command { std: "docker" "start" "-a" "8d6e22dbae978cd7c556e71d0f3bc799265132472076fdcf7b5de44d50adeb80", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8d6e22dbae978cd7c556e71d0f3bc799265132472076fdcf7b5de44d50adeb80", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8d6e22dbae978cd7c556e71d0f3bc799265132472076fdcf7b5de44d50adeb80", kill_on_drop: false }` [INFO] [stdout] 8d6e22dbae978cd7c556e71d0f3bc799265132472076fdcf7b5de44d50adeb80 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-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] 47d573f8ad9c869418e7529280fd1d6b1af236757b7d79f48e4404414949db0d [INFO] running `Command { std: "docker" "start" "-a" "47d573f8ad9c869418e7529280fd1d6b1af236757b7d79f48e4404414949db0d", kill_on_drop: false }` [INFO] [stderr] Checking memchr v2.7.6 [INFO] [stderr] Compiling serde_json v1.0.145 [INFO] [stderr] Checking convert_case v0.10.0 [INFO] [stderr] Compiling syn v2.0.111 [INFO] [stderr] Checking clap_builder v4.5.53 [INFO] [stderr] Checking aho-corasick v1.1.4 [INFO] [stderr] Checking nom v7.1.3 [INFO] [stderr] Checking regex-automata v0.4.13 [INFO] [stderr] Checking glsl v7.0.0 [INFO] [stderr] Compiling clap_derive v4.5.49 [INFO] [stderr] Compiling serde_derive v1.0.228 [INFO] [stderr] Checking regex v1.12.2 [INFO] [stderr] Checking clap v4.5.53 [INFO] [stderr] Checking serde v1.0.228 [INFO] [stderr] Checking generator v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/materials.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:414:36 [INFO] [stdout] | [INFO] [stdout] 414 | const THREE_MANAGED_UNIFORMS: &'static [&'static str] = &[ [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [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/main.rs:414:46 [INFO] [stdout] | [INFO] [stdout] 414 | const THREE_MANAGED_UNIFORMS: &'static [&'static str] = &[ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [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 import is redundant [INFO] [stdout] --> src/materials.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | use serde_json; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constants have by default a `'static` lifetime [INFO] [stdout] --> src/main.rs:414:36 [INFO] [stdout] | [INFO] [stdout] 414 | const THREE_MANAGED_UNIFORMS: &'static [&'static str] = &[ [INFO] [stdout] | -^^^^^^^--------------- help: consider removing `'static`: `&[&'static str]` [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/main.rs:414:46 [INFO] [stdout] | [INFO] [stdout] 414 | const THREE_MANAGED_UNIFORMS: &'static [&'static str] = &[ [INFO] [stdout] | -^^^^^^^---- help: consider removing `'static`: `&str` [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: unused variable: `name` [INFO] [stdout] --> src/main.rs:293:38 [INFO] [stdout] | [INFO] [stdout] 293 | fn gen_hot_reload_init(galois: bool, name: &String) -> String { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `in_varyings` is never read [INFO] [stdout] --> src/shader_link_info.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 149 | pub struct ProgramLinkInfo { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 150 | pub uniforms: VarMap, [INFO] [stdout] 151 | pub in_varyings: VarMap, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `name` [INFO] [stdout] --> src/main.rs:293:38 [INFO] [stdout] | [INFO] [stdout] 293 | fn gen_hot_reload_init(galois: bool, name: &String) -> String { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_name` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/materials.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | Ok(parse_material_string(contents)?) [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] 34 - Ok(parse_material_string(contents)?) [INFO] [stdout] 34 + parse_material_string(contents) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/shader_link_info.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | source: &String, [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] 33 ~ source: &str, [INFO] [stdout] 34 | shader_type: ShaderType, [INFO] [stdout] ... [INFO] [stdout] 43 | [INFO] [stdout] 44 ~ let parsed = ShaderStage::parse(source.to_owned())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `declaration.array_specifier` after checking its variant with `is_some` [INFO] [stdout] --> src/shader_link_info.rs:84:34 [INFO] [stdout] | [INFO] [stdout] 78 | if declaration.array_specifier.is_some() { [INFO] [stdout] | ---------------------------------------- help: try: `if let Some() = &declaration.array_specifier` [INFO] [stdout] ... [INFO] [stdout] 84 | Some(declaration.array_specifier.as_ref().unwrap().clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/shader_link_info.rs:156:10 [INFO] [stdout] | [INFO] [stdout] 156 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/shader_link_info.rs:176:31 [INFO] [stdout] | [INFO] [stdout] 176 | for (_, fs_in_varying) in &fs.in_varyings { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 176 - for (_, fs_in_varying) in &fs.in_varyings { [INFO] [stdout] 176 + for fs_in_varying in fs.in_varyings.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `in_varyings` is never read [INFO] [stdout] --> src/shader_link_info.rs:151:9 [INFO] [stdout] | [INFO] [stdout] 149 | pub struct ProgramLinkInfo { [INFO] [stdout] | --------------- field in this struct [INFO] [stdout] 150 | pub uniforms: VarMap, [INFO] [stdout] 151 | pub in_varyings: VarMap, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/shader_link_info.rs:179:24 [INFO] [stdout] | [INFO] [stdout] 179 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 180 | | "Could not find fragment input varying '{}' as vertex output varying.", [INFO] [stdout] 181 | | fs_in_varying.name [INFO] [stdout] 182 | | ) [INFO] [stdout] 183 | | .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] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 179 ~ return Err(format!( [INFO] [stdout] 180 + "Could not find fragment input varying '{}' as vertex output varying.", [INFO] [stdout] 181 + fs_in_varying.name [INFO] [stdout] 182 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/shader_link_info.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 187 | | "Type mismatch for varying '{}' between vertex and fragment shader.", [INFO] [stdout] 188 | | fs_in_varying.name [INFO] [stdout] 189 | | ) [INFO] [stdout] 190 | | .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] 186 ~ return Err(format!( [INFO] [stdout] 187 + "Type mismatch for varying '{}' between vertex and fragment shader.", [INFO] [stdout] 188 + fs_in_varying.name [INFO] [stdout] 189 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shader_link_info.rs:194:42 [INFO] [stdout] | [INFO] [stdout] 194 | let merged_uniforms = merge_uniforms(&vs, &fs); [INFO] [stdout] | ^^^ help: change this to: `vs` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shader_link_info.rs:194:47 [INFO] [stdout] | [INFO] [stdout] 194 | let merged_uniforms = merge_uniforms(&vs, &fs); [INFO] [stdout] | ^^^ help: change this to: `fs` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/shader_preprocessor.rs:18:26 [INFO] [stdout] | [INFO] [stdout] 18 | fn preprocess_ifdef(src: &String, defines: &Vec) -> Result { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - fn preprocess_ifdef(src: &String, defines: &Vec) -> Result { [INFO] [stdout] 18 + fn preprocess_ifdef(src: &str, defines: &Vec) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/shader_preprocessor.rs:37:71 [INFO] [stdout] | [INFO] [stdout] 37 | let mut defines_set: HashSet = HashSet::from_iter(defines.into_iter().cloned()); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shader_preprocessor.rs:42:27 [INFO] [stdout] | [INFO] [stdout] 42 | let negated = captures[1].len() > 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!captures[1].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: this boolean expression can be simplified [INFO] [stdout] --> src/shader_preprocessor.rs:44:31 [INFO] [stdout] | [INFO] [stdout] 44 | let test_passes = defines_set.contains(define) == !negated; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `defines_set.contains(define) != negated` [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: length comparison to zero [INFO] [stdout] --> src/shader_preprocessor.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | if if_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!if_stack.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/shader_preprocessor.rs:82:28 [INFO] [stdout] | [INFO] [stdout] 82 | fn preprocess_include(src: &String, base_dir: &Path) -> Result> { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - fn preprocess_include(src: &String, base_dir: &Path) -> Result> { [INFO] [stdout] 82 + fn preprocess_include(src: &str, base_dir: &Path) -> Result> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/shader_preprocessor.rs:102:42 [INFO] [stdout] | [INFO] [stdout] 102 | match fs::read_to_string(&include) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `include` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: enclosing `Ok` and `?` operator are unneeded [INFO] [stdout] --> src/materials.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | Ok(parse_material_string(contents)?) [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] 34 - Ok(parse_material_string(contents)?) [INFO] [stdout] 34 + parse_material_string(contents) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/shader_link_info.rs:33:13 [INFO] [stdout] | [INFO] [stdout] 33 | source: &String, [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] 33 ~ source: &str, [INFO] [stdout] 34 | shader_type: ShaderType, [INFO] [stdout] ... [INFO] [stdout] 43 | [INFO] [stdout] 44 ~ let parsed = ShaderStage::parse(source.to_owned())?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `declaration.array_specifier` after checking its variant with `is_some` [INFO] [stdout] --> src/shader_link_info.rs:84:34 [INFO] [stdout] | [INFO] [stdout] 78 | if declaration.array_specifier.is_some() { [INFO] [stdout] | ---------------------------------------- help: try: `if let Some() = &declaration.array_specifier` [INFO] [stdout] ... [INFO] [stdout] 84 | Some(declaration.array_specifier.as_ref().unwrap().clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` 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/main.rs:139:35 [INFO] [stdout] | [INFO] [stdout] 139 | let preprocessed = preprocess(&source, path.parent().unwrap(), defines)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `source` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/shader_link_info.rs:156:10 [INFO] [stdout] | [INFO] [stdout] 156 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] = note: `#[warn(clippy::into_iter_on_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's values [INFO] [stdout] --> src/shader_link_info.rs:176:31 [INFO] [stdout] | [INFO] [stdout] 176 | for (_, fs_in_varying) in &fs.in_varyings { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 176 - for (_, fs_in_varying) in &fs.in_varyings { [INFO] [stdout] 176 + for fs_in_varying in fs.in_varyings.values() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:226:31 [INFO] [stdout] | [INFO] [stdout] 226 | fn generate_shaders_src(name: &String, vs_info: &ShaderInfo, fs_info: &ShaderInfo) -> String { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 226 ~ fn generate_shaders_src(name: &str, vs_info: &ShaderInfo, fs_info: &ShaderInfo) -> String { [INFO] [stdout] 227 ~ let uc_name = name.to_case(Case::UpperCamel); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:293:44 [INFO] [stdout] | [INFO] [stdout] 293 | fn gen_hot_reload_init(galois: bool, name: &String) -> String { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 293 - fn gen_hot_reload_init(galois: bool, name: &String) -> String { [INFO] [stdout] 293 + fn gen_hot_reload_init(galois: bool, name: &str) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:315:37 [INFO] [stdout] | [INFO] [stdout] 315 | let uniform_defs = uniform_defs(&sorted_uniforms)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:330:69 [INFO] [stdout] | [INFO] [stdout] 330 | let uniform_params_with_defaults = uniform_params_with_defaults(&sorted_uniforms)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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: `std::string::String` [INFO] [stdout] --> src/shader_link_info.rs:179:24 [INFO] [stdout] | [INFO] [stdout] 179 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 180 | | "Could not find fragment input varying '{}' as vertex output varying.", [INFO] [stdout] 181 | | fs_in_varying.name [INFO] [stdout] 182 | | ) [INFO] [stdout] 183 | | .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] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] help: consider removing `.into()` [INFO] [stdout] | [INFO] [stdout] 179 ~ return Err(format!( [INFO] [stdout] 180 + "Could not find fragment input varying '{}' as vertex output varying.", [INFO] [stdout] 181 + fs_in_varying.name [INFO] [stdout] 182 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:331:59 [INFO] [stdout] | [INFO] [stdout] 331 | let uniform_new_assignments = uniform_new_assignments(&sorted_uniforms); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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: `std::string::String` [INFO] [stdout] --> src/shader_link_info.rs:186:24 [INFO] [stdout] | [INFO] [stdout] 186 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 187 | | "Type mismatch for varying '{}' between vertex and fragment shader.", [INFO] [stdout] 188 | | fs_in_varying.name [INFO] [stdout] 189 | | ) [INFO] [stdout] 190 | | .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] 186 ~ return Err(format!( [INFO] [stdout] 187 + "Type mismatch for varying '{}' between vertex and fragment shader.", [INFO] [stdout] 188 + fs_in_varying.name [INFO] [stdout] 189 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shader_link_info.rs:194:42 [INFO] [stdout] | [INFO] [stdout] 194 | let merged_uniforms = merge_uniforms(&vs, &fs); [INFO] [stdout] | ^^^ help: change this to: `vs` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/shader_link_info.rs:194:47 [INFO] [stdout] | [INFO] [stdout] 194 | let merged_uniforms = merge_uniforms(&vs, &fs); [INFO] [stdout] | ^^^ help: change this to: `fs` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:393:65 [INFO] [stdout] | [INFO] [stdout] 393 | let uniform_update_assignments = uniform_update_assignments(&sorted_uniforms); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/shader_preprocessor.rs:18:26 [INFO] [stdout] | [INFO] [stdout] 18 | fn preprocess_ifdef(src: &String, defines: &Vec) -> Result { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 18 - fn preprocess_ifdef(src: &String, defines: &Vec) -> Result { [INFO] [stdout] 18 + fn preprocess_ifdef(src: &str, defines: &Vec) -> Result { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/main.rs:421:10 [INFO] [stdout] | [INFO] [stdout] 421 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/main.rs:423:22 [INFO] [stdout] | [INFO] [stdout] 423 | .filter(|x| !THREE_MANAGED_UNIFORMS.iter().any(|c| *c == x.0.as_str())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `THREE_MANAGED_UNIFORMS.contains(&x.0.as_str())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/shader_preprocessor.rs:37:71 [INFO] [stdout] | [INFO] [stdout] 37 | let mut defines_set: HashSet = HashSet::from_iter(defines.into_iter().cloned()); [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/shader_preprocessor.rs:42:27 [INFO] [stdout] | [INFO] [stdout] 42 | let negated = captures[1].len() > 0; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!captures[1].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: this boolean expression can be simplified [INFO] [stdout] --> src/shader_preprocessor.rs:44:31 [INFO] [stdout] | [INFO] [stdout] 44 | let test_passes = defines_set.contains(define) == !negated; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `defines_set.contains(define) != negated` [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: length comparison to zero [INFO] [stdout] --> src/shader_preprocessor.rs:74:8 [INFO] [stdout] | [INFO] [stdout] 74 | if if_stack.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!if_stack.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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/shader_preprocessor.rs:82:28 [INFO] [stdout] | [INFO] [stdout] 82 | fn preprocess_include(src: &String, base_dir: &Path) -> Result> { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 82 - fn preprocess_include(src: &String, base_dir: &Path) -> Result> { [INFO] [stdout] 82 + fn preprocess_include(src: &str, base_dir: &Path) -> Result> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:432:5 [INFO] [stdout] | [INFO] [stdout] 432 | return sorted; [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] 432 - return sorted; [INFO] [stdout] 432 + sorted [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/shader_preprocessor.rs:102:42 [INFO] [stdout] | [INFO] [stdout] 102 | match fs::read_to_string(&include) { [INFO] [stdout] | ^^^^^^^^ help: change this to: `include` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/main.rs:429:10 [INFO] [stdout] | [INFO] [stdout] 429 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:454:33 [INFO] [stdout] | [INFO] [stdout] 454 | to_ts_default_value(&value)?.unwrap_or("undefined".to_string()) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:463:10 [INFO] [stdout] | [INFO] [stdout] 463 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:474:10 [INFO] [stdout] | [INFO] [stdout] 474 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ty.array_specifier` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:533:24 [INFO] [stdout] | [INFO] [stdout] 530 | if ty.array_specifier.is_none() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = &ty.array_specifier` [INFO] [stdout] ... [INFO] [stdout] 533 | get_array_size(ty.array_specifier.as_ref().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `value.ty.array_specifier` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:563:40 [INFO] [stdout] | [INFO] [stdout] 560 | if value.ty.array_specifier.is_none() { [INFO] [stdout] | ------------------------------------- help: try: `if let Some() = &value.ty.array_specifier` [INFO] [stdout] ... [INFO] [stdout] 563 | let array_dim = get_array_size(value.ty.array_specifier.as_ref().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/shader_link_info.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn parse_shader_link_info( [INFO] [stdout] 33 | | source: &String, [INFO] [stdout] 34 | | shader_type: ShaderType, [INFO] [stdout] 35 | | ) -> Result> { [INFO] [stdout] | |___________________________________________- move the `impl` block outside of this function `parse_shader_link_info` [INFO] [stdout] ... [INFO] [stdout] 46 | impl glsl::visitor::Visitor for ShaderLinkInfo { [INFO] [stdout] | ^^^^^----------------------^^^^^-------------- [INFO] [stdout] | | | [INFO] [stdout] | | `ShaderLinkInfo` is not local [INFO] [stdout] | `Visitor` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` 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/main.rs:139:35 [INFO] [stdout] | [INFO] [stdout] 139 | let preprocessed = preprocess(&source, path.parent().unwrap(), defines)?; [INFO] [stdout] | ^^^^^^^ help: change this to: `source` [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: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:226:31 [INFO] [stdout] | [INFO] [stdout] 226 | fn generate_shaders_src(name: &String, vs_info: &ShaderInfo, fs_info: &ShaderInfo) -> String { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 226 ~ fn generate_shaders_src(name: &str, vs_info: &ShaderInfo, fs_info: &ShaderInfo) -> String { [INFO] [stdout] 227 ~ let uc_name = name.to_case(Case::UpperCamel); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/main.rs:293:44 [INFO] [stdout] | [INFO] [stdout] 293 | fn gen_hot_reload_init(galois: bool, name: &String) -> String { [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] help: change this to [INFO] [stdout] | [INFO] [stdout] 293 - fn gen_hot_reload_init(galois: bool, name: &String) -> String { [INFO] [stdout] 293 + fn gen_hot_reload_init(galois: bool, name: &str) -> String { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:315:37 [INFO] [stdout] | [INFO] [stdout] 315 | let uniform_defs = uniform_defs(&sorted_uniforms)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:330:69 [INFO] [stdout] | [INFO] [stdout] 330 | let uniform_params_with_defaults = uniform_params_with_defaults(&sorted_uniforms)?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:331:59 [INFO] [stdout] | [INFO] [stdout] 331 | let uniform_new_assignments = uniform_new_assignments(&sorted_uniforms); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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 expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:393:65 [INFO] [stdout] | [INFO] [stdout] 393 | let uniform_update_assignments = uniform_update_assignments(&sorted_uniforms); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `sorted_uniforms` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/main.rs:421:10 [INFO] [stdout] | [INFO] [stdout] 421 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `contains()` instead of `iter().any()` is more efficient [INFO] [stdout] --> src/main.rs:423:22 [INFO] [stdout] | [INFO] [stdout] 423 | .filter(|x| !THREE_MANAGED_UNIFORMS.iter().any(|c| *c == x.0.as_str())) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `THREE_MANAGED_UNIFORMS.contains(&x.0.as_str())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_contains [INFO] [stdout] = note: `#[warn(clippy::manual_contains)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/main.rs:432:5 [INFO] [stdout] | [INFO] [stdout] 432 | return sorted; [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] 432 - return sorted; [INFO] [stdout] 432 + sorted [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `HashMap` [INFO] [stdout] --> src/main.rs:429:10 [INFO] [stdout] | [INFO] [stdout] 429 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:454:33 [INFO] [stdout] | [INFO] [stdout] 454 | to_ts_default_value(&value)?.unwrap_or("undefined".to_string()) [INFO] [stdout] | ^^^^^^ help: change this to: `value` [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 `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:463:10 [INFO] [stdout] | [INFO] [stdout] 463 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `Vec` [INFO] [stdout] --> src/main.rs:474:10 [INFO] [stdout] | [INFO] [stdout] 474 | .into_iter() [INFO] [stdout] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `ty.array_specifier` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:533:24 [INFO] [stdout] | [INFO] [stdout] 530 | if ty.array_specifier.is_none() { [INFO] [stdout] | ------------------------------- help: try: `if let Some() = &ty.array_specifier` [INFO] [stdout] ... [INFO] [stdout] 533 | get_array_size(ty.array_specifier.as_ref().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `value.ty.array_specifier` after checking its variant with `is_none` [INFO] [stdout] --> src/main.rs:563:40 [INFO] [stdout] | [INFO] [stdout] 560 | if value.ty.array_specifier.is_none() { [INFO] [stdout] | ------------------------------------- help: try: `if let Some() = &value.ty.array_specifier` [INFO] [stdout] ... [INFO] [stdout] 563 | let array_dim = get_array_size(value.ty.array_specifier.as_ref().unwrap())?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> src/shader_link_info.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 32 | / pub fn parse_shader_link_info( [INFO] [stdout] 33 | | source: &String, [INFO] [stdout] 34 | | shader_type: ShaderType, [INFO] [stdout] 35 | | ) -> Result> { [INFO] [stdout] | |___________________________________________- move the `impl` block outside of this function `parse_shader_link_info` [INFO] [stdout] ... [INFO] [stdout] 46 | impl glsl::visitor::Visitor for ShaderLinkInfo { [INFO] [stdout] | ^^^^^----------------------^^^^^-------------- [INFO] [stdout] | | | [INFO] [stdout] | | `ShaderLinkInfo` is not local [INFO] [stdout] | `Visitor` is not local [INFO] [stdout] | [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 10.36s [INFO] running `Command { std: "docker" "inspect" "47d573f8ad9c869418e7529280fd1d6b1af236757b7d79f48e4404414949db0d", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "47d573f8ad9c869418e7529280fd1d6b1af236757b7d79f48e4404414949db0d", kill_on_drop: false }` [INFO] [stdout] 47d573f8ad9c869418e7529280fd1d6b1af236757b7d79f48e4404414949db0d