[INFO] cloning repository https://github.com/BrendanMesters/IWR_68xx_tools_rust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/BrendanMesters/IWR_68xx_tools_rust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBrendanMesters%2FIWR_68xx_tools_rust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBrendanMesters%2FIWR_68xx_tools_rust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8651882f376036674428b0a5762595a17d62a4ff [INFO] linting BrendanMesters/IWR_68xx_tools_rust against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBrendanMesters%2FIWR_68xx_tools_rust" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] [stderr] Updating files: 8% (120/1341) Updating files: 9% (121/1341) Updating files: 9% (133/1341) Updating files: 10% (135/1341) Updating files: 11% (148/1341) Updating files: 12% (161/1341) Updating files: 13% (175/1341) Updating files: 14% (188/1341) Updating files: 15% (202/1341) Updating files: 16% (215/1341) Updating files: 17% (228/1341) Updating files: 18% (242/1341) Updating files: 19% (255/1341) Updating files: 20% (269/1341) Updating files: 21% (282/1341) Updating files: 22% (296/1341) Updating files: 23% (309/1341) Updating files: 24% (322/1341) Updating files: 25% (336/1341) Updating files: 26% (349/1341) Updating files: 27% (363/1341) Updating files: 28% (376/1341) Updating files: 29% (389/1341) Updating files: 30% (403/1341) Updating files: 31% (416/1341) Updating files: 32% (430/1341) Updating files: 33% (443/1341) Updating files: 34% (456/1341) Updating files: 35% (470/1341) Updating files: 36% (483/1341) Updating files: 37% (497/1341) Updating files: 38% (510/1341) Updating files: 38% (513/1341) Updating files: 39% (523/1341) Updating files: 40% (537/1341) Updating files: 41% (550/1341) Updating files: 42% (564/1341) Updating files: 43% (577/1341) Updating files: 44% (591/1341) Updating files: 45% (604/1341) Updating files: 46% (617/1341) Updating files: 47% (631/1341) Updating files: 48% (644/1341) Updating files: 49% (658/1341) Updating files: 50% (671/1341) Updating files: 51% (684/1341) Updating files: 52% (698/1341) Updating files: 53% (711/1341) Updating files: 54% (725/1341) Updating files: 55% (738/1341) Updating files: 56% (751/1341) Updating files: 57% (765/1341) Updating files: 58% (778/1341) Updating files: 59% (792/1341) Updating files: 60% (805/1341) Updating files: 61% (819/1341) Updating files: 62% (832/1341) Updating files: 63% (845/1341) Updating files: 64% (859/1341) Updating files: 65% (872/1341) Updating files: 66% (886/1341) Updating files: 67% (899/1341) Updating files: 68% (912/1341) Updating files: 69% (926/1341) Updating files: 70% (939/1341) Updating files: 71% (953/1341) Updating files: 72% (966/1341) Updating files: 72% (977/1341) Updating files: 73% (979/1341) Updating files: 74% (993/1341) Updating files: 75% (1006/1341) Updating files: 76% (1020/1341) Updating files: 77% (1033/1341) Updating files: 78% (1046/1341) Updating files: 79% (1060/1341) Updating files: 80% (1073/1341) Updating files: 81% (1087/1341) Updating files: 82% (1100/1341) Updating files: 83% (1114/1341) Updating files: 84% (1127/1341) Updating files: 85% (1140/1341) Updating files: 86% (1154/1341) Updating files: 87% (1167/1341) Updating files: 88% (1181/1341) Updating files: 89% (1194/1341) Updating files: 90% (1207/1341) Updating files: 91% (1221/1341) Updating files: 92% (1234/1341) Updating files: 93% (1248/1341) Updating files: 94% (1261/1341) Updating files: 95% (1274/1341) Updating files: 96% (1288/1341) Updating files: 97% (1301/1341) Updating files: 98% (1315/1341) Updating files: 99% (1328/1341) Updating files: 100% (1341/1341) Updating files: 100% (1341/1341), done. [INFO] started tweaking git repo https://github.com/BrendanMesters/IWR_68xx_tools_rust [INFO] finished tweaking git repo https://github.com/BrendanMesters/IWR_68xx_tools_rust [INFO] tweaked toml for git repo https://github.com/BrendanMesters/IWR_68xx_tools_rust written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/BrendanMesters/IWR_68xx_tools_rust 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/BrendanMesters/IWR_68xx_tools_rust 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 serial2 v0.2.28 [INFO] [stderr] Downloaded miniball v0.5.0 [INFO] [stderr] Downloaded coremidi-sys v3.1.1 [INFO] [stderr] Downloaded serial2-tokio v0.1.14 [INFO] [stderr] Downloaded serialport v4.7.0 [INFO] [stderr] Downloaded assert_float_eq v1.1.4 [INFO] [stderr] Downloaded coremidi v0.8.0 [INFO] [stderr] Downloaded unescaper v0.1.5 [INFO] [stderr] Downloaded midir v0.10.1 [INFO] [stderr] Downloaded dbscan v0.3.1 [INFO] [stderr] Downloaded micromath v1.1.1 [INFO] [stderr] Downloaded nalgebra v0.32.6 [INFO] [stderr] Downloaded midi-msg v0.8.0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 420faf54f0b17e12d038af2eeca34c1c0e6cef2622f90923f7b710fa9af733f9 [INFO] running `Command { std: "docker" "start" "-a" "420faf54f0b17e12d038af2eeca34c1c0e6cef2622f90923f7b710fa9af733f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "420faf54f0b17e12d038af2eeca34c1c0e6cef2622f90923f7b710fa9af733f9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "420faf54f0b17e12d038af2eeca34c1c0e6cef2622f90923f7b710fa9af733f9", kill_on_drop: false }` [INFO] [stdout] 420faf54f0b17e12d038af2eeca34c1c0e6cef2622f90923f7b710fa9af733f9 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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] 4ae24e5d420d85d568b42f43c53e14d76f1617f951488d1d48d25dadf1c525f0 [INFO] running `Command { std: "docker" "start" "-a" "4ae24e5d420d85d568b42f43c53e14d76f1617f951488d1d48d25dadf1c525f0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.169 [INFO] [stderr] Checking bytemuck v1.21.0 [INFO] [stderr] Compiling semver v1.0.25 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling cc v1.2.7 [INFO] [stderr] Compiling alsa-sys v0.3.1 [INFO] [stderr] Compiling yeslogic-fontconfig-sys v6.0.0 [INFO] [stderr] Checking miniz_oxide v0.8.2 [INFO] [stderr] Checking futures-core v0.3.31 [INFO] [stderr] Compiling quote v1.0.38 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Checking arrayvec v0.7.6 [INFO] [stderr] Compiling rustversion v1.0.19 [INFO] [stderr] Compiling nix v0.29.0 [INFO] [stderr] Checking lock_api v0.4.12 [INFO] [stderr] Compiling matrixmultiply v0.3.10 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking libloading v0.8.6 [INFO] [stderr] Checking tracing-core v0.1.33 [INFO] [stderr] Checking jpeg-decoder v0.3.1 [INFO] [stderr] Checking safe_arch v0.7.4 [INFO] [stderr] Compiling cpal v0.15.3 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Checking weezl v0.1.8 [INFO] [stderr] Checking symphonia-core v0.5.4 [INFO] [stderr] Compiling syn v2.0.95 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling serde v1.0.217 [INFO] [stderr] Compiling font-kit v0.14.2 [INFO] [stderr] Checking wide v0.7.33 [INFO] [stderr] Checking flate2 v1.0.35 [INFO] [stderr] Compiling rustc_version v0.4.1 [INFO] [stderr] Checking gif v0.12.0 [INFO] [stderr] Checking aho-corasick v1.1.3 [INFO] [stderr] Compiling serde_json v1.0.139 [INFO] [stderr] Checking float-ord v0.3.2 [INFO] [stderr] Checking lewton v0.10.2 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking num-integer v0.1.46 [INFO] [stderr] Checking approx v0.5.1 [INFO] [stderr] Checking num-complex v0.4.6 [INFO] [stderr] Compiling pathfinder_simd v0.5.4 [INFO] [stderr] Checking chrono v0.4.39 [INFO] [stderr] Checking thread_local v1.1.8 [INFO] [stderr] Checking bstr v1.11.3 [INFO] [stderr] Checking claxon v0.4.3 [INFO] [stderr] Checking png v0.17.16 [INFO] [stderr] Checking micromath v1.1.1 [INFO] [stderr] Checking hound v3.5.1 [INFO] [stderr] Checking num-rational v0.4.2 [INFO] [stderr] Checking symphonia-metadata v0.5.4 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Checking dbscan v0.3.1 [INFO] [stderr] Checking assert_float_eq v1.1.4 [INFO] [stderr] Checking pathfinder_geometry v0.5.1 [INFO] [stderr] Checking symphonia-bundle-mp3 v0.5.4 [INFO] [stderr] Compiling freetype-sys v0.20.1 [INFO] [stderr] Compiling psm v0.1.26 [INFO] [stderr] Compiling stacker v0.1.21 [INFO] [stderr] Checking regex-automata v0.4.9 [INFO] [stderr] Checking image v0.24.9 [INFO] [stderr] Checking mio v1.0.3 [INFO] [stderr] Checking parking_lot_core v0.9.10 [INFO] [stderr] Checking socket2 v0.5.8 [INFO] [stderr] Checking signal-hook-registry v1.4.2 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Checking dirs-sys v0.4.1 [INFO] [stderr] Checking dirs v5.0.1 [INFO] [stderr] Checking alsa v0.9.1 [INFO] [stderr] Checking symphonia v0.5.4 [INFO] [stderr] Checking parking_lot v0.12.3 [INFO] [stderr] Checking serial2 v0.2.28 [INFO] [stderr] Checking simba v0.8.1 [INFO] [stderr] Compiling strum_macros v0.24.3 [INFO] [stderr] Checking midir v0.10.1 [INFO] [stderr] Checking strum v0.24.1 [INFO] [stderr] Checking midi-msg v0.8.0 [INFO] [stderr] Checking rodio v0.20.1 [INFO] [stderr] Checking plotters-bitmap v0.3.7 [INFO] [stderr] Checking plotters v0.3.7 [INFO] [stderr] Checking regex v1.11.1 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling futures-macro v0.3.31 [INFO] [stderr] Compiling tokio-macros v2.5.0 [INFO] [stderr] Compiling serde_derive v1.0.217 [INFO] [stderr] Compiling nalgebra-macros v0.2.2 [INFO] [stderr] Compiling tracing-attributes v0.1.28 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking tokio v1.43.0 [INFO] [stderr] Checking unescaper v0.1.5 [INFO] [stderr] Checking kdtree v0.7.0 [INFO] [stderr] Checking serialport v4.7.0 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking mio-serial v5.0.6 [INFO] [stderr] Checking nalgebra v0.32.6 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Checking serial2-tokio v0.1.14 [INFO] [stderr] Checking tokio-serial v5.4.5 [INFO] [stderr] Checking miniball v0.5.0 [INFO] [stderr] Checking IWR_68xx_rust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/frame_file_interface.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use std; [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: this import is redundant [INFO] [stdout] --> src/ipc.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | 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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `filter_pointcloud_noise` [INFO] [stdout] --> src/pre_processor.rs:7:20 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::types::{filter_pointcloud_noise, ArmAngles, ArmPredictionMessage, IpcPacket, MmwFrame}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / /// into music notes (the thing we actually want). [INFO] [stdout] 16 | | [INFO] [stdout] | |_^ [INFO] [stdout] 17 | pub struct AngleNoteGenerator { [INFO] [stdout] | ----------------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | init_data: init_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `init_data` [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: empty line after doc comment [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / /// number of origional points which made each up (the combined weight of the points). [INFO] [stdout] 22 | | [INFO] [stdout] | |_^ [INFO] [stdout] 23 | const CHANGE_COUNT: usize = 5; [INFO] [stdout] | ------------------ the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:69:1 [INFO] [stdout] | [INFO] [stdout] 69 | / /// [INFO] [stdout] 70 | | [INFO] [stdout] | |_^ [INFO] [stdout] 71 | // const MIN_VAL: f32 = 0.4; [INFO] [stdout] 72 | const ARM_SPAN: f32 = 0.7; [INFO] [stdout] | -------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document constant item `ARM_SPAN` then comment it out [INFO] [stdout] | [INFO] [stdout] 3 ~ // /// This file should provide a filter on points, which should be ran DIRECTLY AFTER NOISE CLEANUP. [INFO] [stdout] 4 ~ // /// This filter should increase the prevalence (weight) of points "at your hands", as opposed [INFO] [stdout] 5 ~ // /// to those close to the body. [INFO] [stdout] 6 ~ // /// How to? [INFO] [stdout] 7 ~ // /// [INFO] [stdout] 8 ~ // /// Need a concept of "body center". [INFO] [stdout] 9 ~ // /// Have a function (probably s curve) which maps distance to "center" to a weight mult. [INFO] [stdout] 10 ~ // /// e.g. [INFO] [stdout] 11 ~ // /// [INFO] [stdout] 12 ~ // /// [INFO] [stdout] 13 ~ // /// 1.7 /------------ [INFO] [stdout] 14 ~ // /// /--- [INFO] [stdout] 15 ~ // /// 1 /- [INFO] [stdout] 16 ~ // /// | [INFO] [stdout] 17 ~ // /// -/ [INFO] [stdout] 18 ~ // /// ---/ [INFO] [stdout] 19 ~ // /// 0.5-----/ [INFO] [stdout] 20 ~ // /// [INFO] [stdout] 21 ~ // /// [[ FUNCTION ]] [INFO] [stdout] 22 ~ // /// [INFO] [stdout] 23 ~ // /// Normal curves. [INFO] [stdout] 24 ~ // /// We want to map things which are a specific distance away (arm distance) [INFO] [stdout] 25 ~ // /// This could be made better with "span" knowledge (length of arm) [INFO] [stdout] 26 ~ // /// [INFO] [stdout] 27 ~ // /// Since the first part of a noraml curve calculation (1/(sig * root(2*PI))) is "constant" [INFO] [stdout] 28 ~ // /// w.r.t. our input, we can leave that out, as we only care about the comparison. [INFO] [stdout] 29 ~ // /// [INFO] [stdout] 30 ~ // /// [INFO] [stdout] 31 ~ // /// SCRAP THE FOLLIOWING [INFO] [stdout] 32 ~ // /// ============================================================ [INFO] [stdout] 33 ~ // /// Sigmoid function is probably a good first try. [INFO] [stdout] 34 ~ // /// One issue we could find ourselves in is that the calculation may become [INFO] [stdout] 35 ~ // /// expensive. [INFO] [stdout] 36 ~ // /// To solve this, we could generate a LOOKUPTABLE, with a writing lock. [INFO] [stdout] 37 ~ // /// This lookuptable would then be created the first time we call this function, [INFO] [stdout] 38 ~ // /// and would be reused afterwards to, look up. [INFO] [stdout] 39 ~ // /// 100 values in this table should already give plenty of granularity. [INFO] [stdout] 40 ~ // /// [INFO] [stdout] 41 ~ // /// The sigmoid function roughly maps: [INFO] [stdout] 42 ~ // /// * -2 => -1 [INFO] [stdout] 43 ~ // /// * -1 => -0.8 [INFO] [stdout] 44 ~ // /// * 0 => 0 [INFO] [stdout] 45 ~ // /// * 1 => 0.8 [INFO] [stdout] 46 ~ // /// * 2 => 1 [INFO] [stdout] 47 ~ // /// [INFO] [stdout] 48 ~ // /// We want distance 0 to be a low value, and distance ~2 to be a high value. [INFO] [stdout] 49 ~ // /// ================================================================= [INFO] [stdout] 50 ~ // /// [INFO] [stdout] 51 ~ // /// [[ CENTER FINDER ]] [INFO] [stdout] 52 ~ // /// [INFO] [stdout] 53 ~ // /// We could do this in two ways: [INFO] [stdout] 54 ~ // /// - Dynamic: Keep a a history of all points, potentially also taking into account [INFO] [stdout] 55 ~ // /// context clues, like the constant spanwidth of a person (if you find points) [INFO] [stdout] 56 ~ // /// tracing a circle, then the center of the circle is the body center, cause [INFO] [stdout] 57 ~ // /// thats how humans work [INFO] [stdout] 58 ~ // /// - Pre-config: Similar to our "Torso removal" code, we simply take a "fingerprint" of the [INFO] [stdout] 59 ~ // /// torso location and use that. [INFO] [stdout] 60 ~ // /// - Arm-config: We could also use the info from the arm configuration to "figure out" [INFO] [stdout] 61 ~ // /// The torso centroid location. [INFO] [stdout] 62 ~ // /// [INFO] [stdout] 63 ~ // /// [[ PROCESS ]] [INFO] [stdout] 64 ~ // /// [INFO] [stdout] 65 ~ // /// 1. We might update our idea of the torso, if we calculate that dynamically. [INFO] [stdout] 66 ~ // /// 2. For each point, we calculate the distance to the centroid. [INFO] [stdout] 67 ~ // /// 3. We apply the weight modification code on each point, based on its torso. [INFO] [stdout] 68 ~ // /// [INFO] [stdout] 69 ~ // /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/frame_file_interface.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | use std; [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: this import is redundant [INFO] [stdout] --> src/ipc.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | 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] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/tlv_frame_reader.rs:190:31 [INFO] [stdout] | [INFO] [stdout] 190 | .map(|(lower, upper)| (((*lower as u16) << 8) | *upper as u16)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 190 - .map(|(lower, upper)| (((*lower as u16) << 8) | *upper as u16)) [INFO] [stdout] 190 + .map(|(lower, upper)| ((*lower as u16) << 8) | *upper as u16 ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/tlv_translator.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use chrono; [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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `filter_pointcloud_noise` [INFO] [stdout] --> src/pre_processor.rs:7:20 [INFO] [stdout] | [INFO] [stdout] 7 | use crate::types::{filter_pointcloud_noise, ArmAngles, ArmPredictionMessage, IpcPacket, MmwFrame}; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:15:1 [INFO] [stdout] | [INFO] [stdout] 15 | / /// into music notes (the thing we actually want). [INFO] [stdout] 16 | | [INFO] [stdout] | |_^ [INFO] [stdout] 17 | pub struct AngleNoteGenerator { [INFO] [stdout] | ----------------------------- the comment documents this struct [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::pc_math::get_angle` [INFO] [stdout] --> src/types.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::pc_math::get_angle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 149 | init_data: init_data, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `init_data` [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: unused import: `crate::pre_processor::angle_to_note::AngleRange` [INFO] [stdout] --> src/types.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::pre_processor::angle_to_note::AngleRange; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits grouped inconsistently by underscores [INFO] [stdout] --> src/types.rs:182:54 [INFO] [stdout] | [INFO] [stdout] 182 | const DOTNET_TO_UNIX_EPOCH_DIFF_TICKS: i64 = 621_355_968_000_00; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider: `62_135_596_800_000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping [INFO] [stdout] = note: `#[warn(clippy::inconsistent_digit_grouping)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:21:1 [INFO] [stdout] | [INFO] [stdout] 21 | / /// number of origional points which made each up (the combined weight of the points). [INFO] [stdout] 22 | | [INFO] [stdout] | |_^ [INFO] [stdout] 23 | const CHANGE_COUNT: usize = 5; [INFO] [stdout] | ------------------ the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:69:1 [INFO] [stdout] | [INFO] [stdout] 69 | / /// [INFO] [stdout] 70 | | [INFO] [stdout] | |_^ [INFO] [stdout] 71 | // const MIN_VAL: f32 = 0.4; [INFO] [stdout] 72 | const ARM_SPAN: f32 = 0.7; [INFO] [stdout] | -------------- the comment documents this constant item [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the doc comment should not document constant item `ARM_SPAN` then comment it out [INFO] [stdout] | [INFO] [stdout] 3 ~ // /// This file should provide a filter on points, which should be ran DIRECTLY AFTER NOISE CLEANUP. [INFO] [stdout] 4 ~ // /// This filter should increase the prevalence (weight) of points "at your hands", as opposed [INFO] [stdout] 5 ~ // /// to those close to the body. [INFO] [stdout] 6 ~ // /// How to? [INFO] [stdout] 7 ~ // /// [INFO] [stdout] 8 ~ // /// Need a concept of "body center". [INFO] [stdout] 9 ~ // /// Have a function (probably s curve) which maps distance to "center" to a weight mult. [INFO] [stdout] 10 ~ // /// e.g. [INFO] [stdout] 11 ~ // /// [INFO] [stdout] 12 ~ // /// [INFO] [stdout] 13 ~ // /// 1.7 /------------ [INFO] [stdout] 14 ~ // /// /--- [INFO] [stdout] 15 ~ // /// 1 /- [INFO] [stdout] 16 ~ // /// | [INFO] [stdout] 17 ~ // /// -/ [INFO] [stdout] 18 ~ // /// ---/ [INFO] [stdout] 19 ~ // /// 0.5-----/ [INFO] [stdout] 20 ~ // /// [INFO] [stdout] 21 ~ // /// [[ FUNCTION ]] [INFO] [stdout] 22 ~ // /// [INFO] [stdout] 23 ~ // /// Normal curves. [INFO] [stdout] 24 ~ // /// We want to map things which are a specific distance away (arm distance) [INFO] [stdout] 25 ~ // /// This could be made better with "span" knowledge (length of arm) [INFO] [stdout] 26 ~ // /// [INFO] [stdout] 27 ~ // /// Since the first part of a noraml curve calculation (1/(sig * root(2*PI))) is "constant" [INFO] [stdout] 28 ~ // /// w.r.t. our input, we can leave that out, as we only care about the comparison. [INFO] [stdout] 29 ~ // /// [INFO] [stdout] 30 ~ // /// [INFO] [stdout] 31 ~ // /// SCRAP THE FOLLIOWING [INFO] [stdout] 32 ~ // /// ============================================================ [INFO] [stdout] 33 ~ // /// Sigmoid function is probably a good first try. [INFO] [stdout] 34 ~ // /// One issue we could find ourselves in is that the calculation may become [INFO] [stdout] 35 ~ // /// expensive. [INFO] [stdout] 36 ~ // /// To solve this, we could generate a LOOKUPTABLE, with a writing lock. [INFO] [stdout] 37 ~ // /// This lookuptable would then be created the first time we call this function, [INFO] [stdout] 38 ~ // /// and would be reused afterwards to, look up. [INFO] [stdout] 39 ~ // /// 100 values in this table should already give plenty of granularity. [INFO] [stdout] 40 ~ // /// [INFO] [stdout] 41 ~ // /// The sigmoid function roughly maps: [INFO] [stdout] 42 ~ // /// * -2 => -1 [INFO] [stdout] 43 ~ // /// * -1 => -0.8 [INFO] [stdout] 44 ~ // /// * 0 => 0 [INFO] [stdout] 45 ~ // /// * 1 => 0.8 [INFO] [stdout] 46 ~ // /// * 2 => 1 [INFO] [stdout] 47 ~ // /// [INFO] [stdout] 48 ~ // /// We want distance 0 to be a low value, and distance ~2 to be a high value. [INFO] [stdout] 49 ~ // /// ================================================================= [INFO] [stdout] 50 ~ // /// [INFO] [stdout] 51 ~ // /// [[ CENTER FINDER ]] [INFO] [stdout] 52 ~ // /// [INFO] [stdout] 53 ~ // /// We could do this in two ways: [INFO] [stdout] 54 ~ // /// - Dynamic: Keep a a history of all points, potentially also taking into account [INFO] [stdout] 55 ~ // /// context clues, like the constant spanwidth of a person (if you find points) [INFO] [stdout] 56 ~ // /// tracing a circle, then the center of the circle is the body center, cause [INFO] [stdout] 57 ~ // /// thats how humans work [INFO] [stdout] 58 ~ // /// - Pre-config: Similar to our "Torso removal" code, we simply take a "fingerprint" of the [INFO] [stdout] 59 ~ // /// torso location and use that. [INFO] [stdout] 60 ~ // /// - Arm-config: We could also use the info from the arm configuration to "figure out" [INFO] [stdout] 61 ~ // /// The torso centroid location. [INFO] [stdout] 62 ~ // /// [INFO] [stdout] 63 ~ // /// [[ PROCESS ]] [INFO] [stdout] 64 ~ // /// [INFO] [stdout] 65 ~ // /// 1. We might update our idea of the torso, if we calculate that dynamically. [INFO] [stdout] 66 ~ // /// 2. For each point, we calculate the distance to the centroid. [INFO] [stdout] 67 ~ // /// 3. We apply the weight modification code on each point, based on its torso. [INFO] [stdout] 68 ~ // /// [INFO] [stdout] 69 ~ // /// [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around closure body [INFO] [stdout] --> src/tlv_frame_reader.rs:190:31 [INFO] [stdout] | [INFO] [stdout] 190 | .map(|(lower, upper)| (((*lower as u16) << 8) | *upper as u16)) [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 190 - .map(|(lower, upper)| (((*lower as u16) << 8) | *upper as u16)) [INFO] [stdout] 190 + .map(|(lower, upper)| ((*lower as u16) << 8) | *upper as u16 ) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/tlv_translator.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use chrono; [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] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::pc_math::get_angle` [INFO] [stdout] --> src/types.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use crate::pc_math::get_angle; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::pre_processor::angle_to_note::AngleRange` [INFO] [stdout] --> src/types.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use crate::pre_processor::angle_to_note::AngleRange; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: digits grouped inconsistently by underscores [INFO] [stdout] --> src/types.rs:182:54 [INFO] [stdout] | [INFO] [stdout] 182 | const DOTNET_TO_UNIX_EPOCH_DIFF_TICKS: i64 = 621_355_968_000_00; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider: `62_135_596_800_000` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#inconsistent_digit_grouping [INFO] [stdout] = note: `#[warn(clippy::inconsistent_digit_grouping)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pre_processor.rs:247:29 [INFO] [stdout] | [INFO] [stdout] 247 | if let Some(mut pc) = mmw_frame.pointcloud { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pre_processor.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | mut ball_int: MebInterface, [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pre_processor.rs:247:29 [INFO] [stdout] | [INFO] [stdout] 247 | if let Some(mut pc) = mmw_frame.pointcloud { [INFO] [stdout] | ----^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/pre_processor.rs:402:5 [INFO] [stdout] | [INFO] [stdout] 402 | mut ball_int: MebInterface, [INFO] [stdout] | ----^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/ipc.rs:244:20 [INFO] [stdout] | [INFO] [stdout] 244 | Ok(message) => { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `message` [INFO] [stdout] --> src/ipc.rs:244:20 [INFO] [stdout] | [INFO] [stdout] 244 | Ok(message) => { [INFO] [stdout] | ^^^^^^^ help: if this is intentional, prefix it with an underscore: `_message` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `spine_mid` [INFO] [stdout] --> src/types.rs:233:13 [INFO] [stdout] | [INFO] [stdout] 233 | let spine_mid = self.skeletal_points[1]; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_spine_mid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `neck` [INFO] [stdout] --> src/types.rs:235:13 [INFO] [stdout] | [INFO] [stdout] 235 | let neck = self.skeletal_points[2]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_neck` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `shoulder_left` [INFO] [stdout] --> src/types.rs:236:13 [INFO] [stdout] | [INFO] [stdout] 236 | let shoulder_left = self.skeletal_points[4]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_shoulder_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `shoulder_right` [INFO] [stdout] --> src/types.rs:237:13 [INFO] [stdout] | [INFO] [stdout] 237 | let shoulder_right = self.skeletal_points[8]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_shoulder_right` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `MAX_NUM_POINTS` is never used [INFO] [stdout] --> src/pre_processor/circle_fit.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const MAX_NUM_POINTS: usize = 5000; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recalculate_meb` is never used [INFO] [stdout] --> src/pre_processor/circle_fit.rs:277:18 [INFO] [stdout] | [INFO] [stdout] 160 | impl MebInterface { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 277 | pub async fn recalculate_meb(&mut self, new_points: &PointCloud) -> Meb { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `filter_pointcloud_noise` is never used [INFO] [stdout] --> src/types.rs:373:8 [INFO] [stdout] | [INFO] [stdout] 373 | pub fn filter_pointcloud_noise( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | return Ok(Config::parse_conf_string(conf_str)); [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] 22 - return Ok(Config::parse_conf_string(conf_str)); [INFO] [stdout] 22 + Ok(Config::parse_conf_string(conf_str)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.err().expect()` on a `Result` value [INFO] [stdout] --> src/file_reader.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | .err() [INFO] [stdout] | __________________^ [INFO] [stdout] 17 | | .expect("Error checking has already been done"); [INFO] [stdout] | |_______________________^ help: try: `expect_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#err_expect [INFO] [stdout] = note: `#[warn(clippy::err_expect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | return conf; [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] 28 - return conf; [INFO] [stdout] 28 + conf [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | return settings; [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] 112 - return settings; [INFO] [stdout] 112 + settings [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/file_reader.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | /// contained in the file or an error [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 142 | /// contained in the file or an error [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | return Ok(buffer); [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] 148 - return Ok(buffer); [INFO] [stdout] 148 + Ok(buffer) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fmcw_manager.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / return Ok(Fmcw { [INFO] [stdout] 30 | | cfg, [INFO] [stdout] 31 | | data, [INFO] [stdout] 32 | | config, [INFO] [stdout] 33 | | internal_buffer: [0; 1024], [INFO] [stdout] 34 | | }); [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] 29 ~ Ok(Fmcw { [INFO] [stdout] 30 + cfg, [INFO] [stdout] 31 + data, [INFO] [stdout] 32 + config, [INFO] [stdout] 33 + internal_buffer: [0; 1024], [INFO] [stdout] 34 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/fmcw_manager.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let cfg = match SerialPort::open(&settings.cfg_port, settings.cfg_baud) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 22 | | Ok(v) => v, [INFO] [stdout] 23 | | Err(v) => return Err(v), [INFO] [stdout] 24 | | }; [INFO] [stdout] | |_________^ help: try instead: `SerialPort::open(&settings.cfg_port, settings.cfg_baud)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/fmcw_manager.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | let data = match SerialPort::open(&settings.data_port, settings.data_baud) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 26 | | Ok(v) => v, [INFO] [stdout] 27 | | Err(v) => return Err(v), [INFO] [stdout] 28 | | }; [INFO] [stdout] | |_________^ help: try instead: `SerialPort::open(&settings.data_port, settings.data_baud)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/fmcw_manager.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | if bytes.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `bytes.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: unneeded `return` statement [INFO] [stdout] --> src/fmcw_manager.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return Ok(result); [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] 131 - return Ok(result); [INFO] [stdout] 131 + Ok(result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/frame_file_interface.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::u128; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/frame_file_interface.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let _ = self.file_reference.write("]".as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/frame_file_interface.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | /// will be located (so most likely `./frame_recordings/`) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 46 | /// will be located (so most likely `./frame_recordings/`) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/frame_file_interface.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | /// simply the datetime) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 48 | /// simply the datetime) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | return Ok(()); [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] 95 - return Ok(()); [INFO] [stdout] 95 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/frame_file_interface.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.file_reference = Box::new( [INFO] [stdout] 87 | | File::create( [INFO] [stdout] 88 | | self.data_location [INFO] [stdout] 89 | | .join(format!("{:04}.json", self.file_counter)), [INFO] [stdout] 90 | | ) [INFO] [stdout] 91 | | .await?, [INFO] [stdout] 92 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] = note: `#[warn(clippy::replace_box)]` on by default [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 86 ~ *self.file_reference = File::create( [INFO] [stdout] 87 + self.data_location [INFO] [stdout] 88 + .join(format!("{:04}.json", self.file_counter)), [INFO] [stdout] 89 + ) [INFO] [stdout] 90 ~ .await?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/frame_file_interface.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | current_t = current_t / 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_t /= 10` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/frame_file_interface.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | time = time / 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `time /= 10` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | return n; [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] 336 - return n; [INFO] [stdout] 336 + n [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | return Some(retval); [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] 350 - return Some(retval); [INFO] [stdout] 350 + Some(retval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/frame_file_interface.rs:344:16 [INFO] [stdout] | [INFO] [stdout] 344 | if self.kinect_buffer.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.kinect_buffer.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/frame_file_interface.rs:428:16 [INFO] [stdout] | [INFO] [stdout] 428 | if ffr.frame_queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ffr.frame_queue.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: consider using `sort_by_key` [INFO] [stdout] --> src/frame_file_interface.rs:456:9 [INFO] [stdout] | [INFO] [stdout] 456 | file_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 456 - file_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 456 + file_vec.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:486:9 [INFO] [stdout] | [INFO] [stdout] 486 | return self.frame_queue.pop_front(); [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] 486 - return self.frame_queue.pop_front(); [INFO] [stdout] 486 + self.frame_queue.pop_front() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/frame_file_interface.rs:478:42 [INFO] [stdout] | [INFO] [stdout] 478 | if self.file_itter.len() == 0 && self.frame_queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.frame_queue.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: this `if` statement can be collapsed [INFO] [stdout] --> src/frame_file_interface.rs:481:9 [INFO] [stdout] | [INFO] [stdout] 481 | / if self.frame_queue.len() < MIN_NUM_BUFFERED_FRAMES { [INFO] [stdout] 482 | | if self.file_itter.len() > 0 { [INFO] [stdout] 483 | | _ = self.read_one_file().await; [INFO] [stdout] 484 | | } [INFO] [stdout] 485 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 481 ~ if self.frame_queue.len() < MIN_NUM_BUFFERED_FRAMES [INFO] [stdout] 482 ~ && self.file_itter.len() > 0 { [INFO] [stdout] 483 | _ = self.read_one_file().await; [INFO] [stdout] 484 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `spine_mid` [INFO] [stdout] --> src/types.rs:233:13 [INFO] [stdout] | [INFO] [stdout] 233 | let spine_mid = self.skeletal_points[1]; [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_spine_mid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `neck` [INFO] [stdout] --> src/types.rs:235:13 [INFO] [stdout] | [INFO] [stdout] 235 | let neck = self.skeletal_points[2]; [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_neck` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `shoulder_left` [INFO] [stdout] --> src/types.rs:236:13 [INFO] [stdout] | [INFO] [stdout] 236 | let shoulder_left = self.skeletal_points[4]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_shoulder_left` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `shoulder_right` [INFO] [stdout] --> src/types.rs:237:13 [INFO] [stdout] | [INFO] [stdout] 237 | let shoulder_right = self.skeletal_points[8]; [INFO] [stdout] | ^^^^^^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_shoulder_right` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:613:5 [INFO] [stdout] | [INFO] [stdout] 613 | return 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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 613 - return 0; [INFO] [stdout] 613 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ipc.rs:112:21 [INFO] [stdout] | [INFO] [stdout] 112 | / if CONSTANTS.save_ground_truth_to_file { [INFO] [stdout] 113 | | if let Some(ref mut f) = ground_truth_file { [INFO] [stdout] 114 | | // Get angles, get prediction and get printable line [INFO] [stdout] 115 | | let angles = kinect_data.get_arm_angles(); [INFO] [stdout] ... | [INFO] [stdout] 127 | | } [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] 109 ~ IpcPacket::Kinect(kinect_data) [INFO] [stdout] 110 | // Calculate with internal function [INFO] [stdout] 111 | // kinect_data.calculate_ground_truth [INFO] [stdout] 112 ~ if CONSTANTS.save_ground_truth_to_file => { [INFO] [stdout] 113 | if let Some(ref mut f) = ground_truth_file { [INFO] [stdout] ... [INFO] [stdout] 126 | } [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> src/ipc.rs:234:28 [INFO] [stdout] | [INFO] [stdout] 234 | return Err(e.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [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] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/pc_math.rs:45:1 [INFO] [stdout] | [INFO] [stdout] 45 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub async fn dbscan_noise_reduction(datapoints: Vec) -> Vec { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 113 | / pub async fn get_largest_clusters( [INFO] [stdout] 114 | | datapoints: &PointCloud, [INFO] [stdout] 115 | | n: usize, [INFO] [stdout] 116 | | esp: f64, [INFO] [stdout] 117 | | min_points: usize, [INFO] [stdout] 118 | | ) -> Vec<(PointCloud, f32)> { [INFO] [stdout] | |___________________________^ [INFO] [stdout] ... [INFO] [stdout] 171 | / pub async fn scale_pc(pointcloud: &mut Vec, scaling_factor: T) [INFO] [stdout] 172 | | where [INFO] [stdout] 173 | | PointCloudPoint: Mul, [INFO] [stdout] | |______________________________________________________^ [INFO] [stdout] ... [INFO] [stdout] 184 | / pub async fn find_num_neighbours( [INFO] [stdout] 185 | | center: &PointCloudPoint, [INFO] [stdout] 186 | | others: &Vec<&PointCloudPoint>, [INFO] [stdout] 187 | | dist: f32, [INFO] [stdout] 188 | | ) -> usize { [INFO] [stdout] | |__________^ [INFO] [stdout] ... [INFO] [stdout] 192 | / pub async fn find_neighber_weight( [INFO] [stdout] 193 | | center: &PointCloudPoint, [INFO] [stdout] 194 | | others: &Vec<&PointCloudPoint>, [INFO] [stdout] 195 | | dist: f32, [INFO] [stdout] 196 | | ) -> f32 { [INFO] [stdout] | |________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: clamp-like pattern without using clamp function [INFO] [stdout] --> src/pc_math.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 21 | let clamped_cos = cos_angle.max(-1.0).min(1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cos_angle.clamp(-1.0, 1.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pc_math.rs:26:52 [INFO] [stdout] | [INFO] [stdout] 26 | pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [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] 26 - pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [INFO] [stdout] 26 + pub async fn calculate_points_centroid(datapoints: &[PointCloudPoint]) -> PointCloudPoint { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pc_math.rs:73:23 [INFO] [stdout] | [INFO] [stdout] 73 | let pc = vec![point.clone(), point.clone(), point.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `point` [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: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pc_math.rs:73:38 [INFO] [stdout] | [INFO] [stdout] 73 | let pc = vec![point.clone(), point.clone(), point.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `point` [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: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pc_math.rs:73:53 [INFO] [stdout] | [INFO] [stdout] 73 | let pc = vec![point.clone(), point.clone(), point.clone()]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `point` [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: unneeded `return` statement [INFO] [stdout] --> src/pc_math.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | return if result.len() > 0 { result } else { datapoints }; [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] 107 - return if result.len() > 0 { result } else { datapoints }; [INFO] [stdout] 107 + if result.len() > 0 { result } else { datapoints } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pc_math.rs:107:15 [INFO] [stdout] | [INFO] [stdout] 107 | return if result.len() > 0 { result } else { datapoints }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.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: unneeded `return` statement [INFO] [stdout] --> src/pc_math.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | return high; [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] 168 - return high; [INFO] [stdout] 168 + high [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/adaptive_kalman.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return self.x; [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] 56 - return self.x; [INFO] [stdout] 56 + self.x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:151:70 [INFO] [stdout] | [INFO] [stdout] 151 | let calc_left = AngleNoteGenerator::get_zone_index(&zones.0, &angles); [INFO] [stdout] | ^^^^^^^ help: change this to: `angles` [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/pre_processor/angle_to_note.rs:152:71 [INFO] [stdout] | [INFO] [stdout] 152 | let calc_right = AngleNoteGenerator::get_zone_index(&zones.1, &angles); [INFO] [stdout] | ^^^^^^^ help: change this to: `angles` [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: constant `MAX_NUM_POINTS` is never used [INFO] [stdout] --> src/pre_processor/circle_fit.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | const MAX_NUM_POINTS: usize = 5000; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `recalculate_meb` is never used [INFO] [stdout] --> src/pre_processor/circle_fit.rs:277:18 [INFO] [stdout] | [INFO] [stdout] 160 | impl MebInterface { [INFO] [stdout] | ----------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 277 | pub async fn recalculate_meb(&mut self, new_points: &PointCloud) -> Meb { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `filter_pointcloud_noise` is never used [INFO] [stdout] --> src/types.rs:373:8 [INFO] [stdout] | [INFO] [stdout] 373 | pub fn filter_pointcloud_noise( [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | / int_zones [INFO] [stdout] 233 | | .get_mut(idx - 1) [INFO] [stdout] 234 | | .map(|z| z.move_end_deg(-move_dist)); [INFO] [stdout] | |____________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 232 ~ if let Some(z) = int_zones [INFO] [stdout] 233 + .get_mut(idx - 1) { z.move_end_deg(-move_dist) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:278:117 [INFO] [stdout] | [INFO] [stdout] 278 | debug!(target: "angle_to_note", "Did NOT SELECT zone {:?} ({:?}), with weight {:?}", idx, zones[idx.clone()], w); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `(*idx)` [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: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 22 | return Ok(Config::parse_conf_string(conf_str)); [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] 22 - return Ok(Config::parse_conf_string(conf_str)); [INFO] [stdout] 22 + Ok(Config::parse_conf_string(conf_str)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `.err().expect()` on a `Result` value [INFO] [stdout] --> src/file_reader.rs:16:18 [INFO] [stdout] | [INFO] [stdout] 16 | .err() [INFO] [stdout] | __________________^ [INFO] [stdout] 17 | | .expect("Error checking has already been done"); [INFO] [stdout] | |_______________________^ help: try: `expect_err` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#err_expect [INFO] [stdout] = note: `#[warn(clippy::err_expect)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | return conf; [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] 28 - return conf; [INFO] [stdout] 28 + conf [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:283:108 [INFO] [stdout] | [INFO] [stdout] 283 | debug!(target: "angle_to_note", "Selected zone {:?} ({:?}), with weight: {:?}", idx, zones[idx.clone()], w); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `idx` [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: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:112:9 [INFO] [stdout] | [INFO] [stdout] 112 | return settings; [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] 112 - return settings; [INFO] [stdout] 112 + settings [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/pre_processor/arm_angle_calculator.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | if dist > 1.3 || dist < 0.3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.3..=1.3).contains(&dist)` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pre_processor/arm_angle_calculator.rs:80:45 [INFO] [stdout] | [INFO] [stdout] 80 | pub async fn update_arm2(&self, points: &Vec) -> (f32, f32) { [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] 80 - pub async fn update_arm2(&self, points: &Vec) -> (f32, f32) { [INFO] [stdout] 80 + pub async fn update_arm2(&self, points: &[PointCloudPoint]) -> (f32, f32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pre_processor/arm_angle_calculator.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | if left.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!left.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/pre_processor/arm_angle_calculator.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | if right.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!right.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: doc list item without indentation [INFO] [stdout] --> src/file_reader.rs:142:5 [INFO] [stdout] | [INFO] [stdout] 142 | /// contained in the file or an error [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] = note: `#[warn(clippy::doc_lazy_continuation)]` on by default [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 142 | /// contained in the file or an error [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/file_reader.rs:148:5 [INFO] [stdout] | [INFO] [stdout] 148 | return Ok(buffer); [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] 148 - return Ok(buffer); [INFO] [stdout] 148 + Ok(buffer) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fmcw_manager.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | / return Ok(Fmcw { [INFO] [stdout] 30 | | cfg, [INFO] [stdout] 31 | | data, [INFO] [stdout] 32 | | config, [INFO] [stdout] 33 | | internal_buffer: [0; 1024], [INFO] [stdout] 34 | | }); [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] 29 ~ Ok(Fmcw { [INFO] [stdout] 30 + cfg, [INFO] [stdout] 31 + data, [INFO] [stdout] 32 + config, [INFO] [stdout] 33 + internal_buffer: [0; 1024], [INFO] [stdout] 34 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/fmcw_manager.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let cfg = match SerialPort::open(&settings.cfg_port, settings.cfg_baud) { [INFO] [stdout] | ___________________^ [INFO] [stdout] 22 | | Ok(v) => v, [INFO] [stdout] 23 | | Err(v) => return Err(v), [INFO] [stdout] 24 | | }; [INFO] [stdout] | |_________^ help: try instead: `SerialPort::open(&settings.cfg_port, settings.cfg_baud)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] = note: `#[warn(clippy::question_mark)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `match` expression can be replaced with `?` [INFO] [stdout] --> src/fmcw_manager.rs:25:20 [INFO] [stdout] | [INFO] [stdout] 25 | let data = match SerialPort::open(&settings.data_port, settings.data_baud) { [INFO] [stdout] | ____________________^ [INFO] [stdout] 26 | | Ok(v) => v, [INFO] [stdout] 27 | | Err(v) => return Err(v), [INFO] [stdout] 28 | | }; [INFO] [stdout] | |_________^ help: try instead: `SerialPort::open(&settings.data_port, settings.data_baud)?` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#question_mark [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/fmcw_manager.rs:78:16 [INFO] [stdout] | [INFO] [stdout] 78 | if bytes.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `bytes.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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | / return Ok(ArmLocalizer { [INFO] [stdout] 143 | | left_low: ll, [INFO] [stdout] 144 | | right_low: rl, [INFO] [stdout] 145 | | left_middle: lm, [INFO] [stdout] ... | [INFO] [stdout] 149 | | init_data: init_data, [INFO] [stdout] 150 | | }); [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] 142 ~ Ok(ArmLocalizer { [INFO] [stdout] 143 + left_low: ll, [INFO] [stdout] 144 + right_low: rl, [INFO] [stdout] 145 + left_middle: lm, [INFO] [stdout] 146 + right_middle: rm, [INFO] [stdout] 147 + left_high: lh, [INFO] [stdout] 148 + right_high: rh, [INFO] [stdout] 149 + init_data: init_data, [INFO] [stdout] 150 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 95 | | "When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 96 | | `Initializables::ArmLocations` enum variant" [INFO] [stdout] 97 | | ) [INFO] [stdout] 98 | | .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] 94 ~ return Err(format!( [INFO] [stdout] 95 + "When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 96 + `Initializables::ArmLocations` enum variant" [INFO] [stdout] 97 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 95 | | "When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 96 | | `Initializables::ArmLocations` enum variant" [INFO] [stdout] 97 | | ) [INFO] [stdout] | |_____________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 94 ~ return Err("When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 95 + `Initializables::ArmLocations` enum variant".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/fmcw_manager.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return Ok(result); [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] 131 - return Ok(result); [INFO] [stdout] 131 + Ok(result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | return (left, right); [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] 131 - return (left, right); [INFO] [stdout] 131 + (left, right) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: importing legacy numeric constants [INFO] [stdout] --> src/frame_file_interface.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use std::u128; [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: remove this import [INFO] [stdout] = note: then `u128::` will resolve to the respective associated constant [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants [INFO] [stdout] = note: `#[warn(clippy::legacy_numeric_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-binding `let` on a future [INFO] [stdout] --> src/frame_file_interface.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | let _ = self.file_reference.write("]".as_bytes()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider awaiting the future or dropping explicitly with `std::mem::drop` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_underscore_future [INFO] [stdout] = note: `#[warn(clippy::let_underscore_future)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/frame_file_interface.rs:46:9 [INFO] [stdout] | [INFO] [stdout] 46 | /// will be located (so most likely `./frame_recordings/`) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 46 | /// will be located (so most likely `./frame_recordings/`) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/frame_file_interface.rs:48:9 [INFO] [stdout] | [INFO] [stdout] 48 | /// simply the datetime) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 48 | /// simply the datetime) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:95:9 [INFO] [stdout] | [INFO] [stdout] 95 | return Ok(()); [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] 95 - return Ok(()); [INFO] [stdout] 95 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: creating a new box [INFO] [stdout] --> src/frame_file_interface.rs:86:9 [INFO] [stdout] | [INFO] [stdout] 86 | / self.file_reference = Box::new( [INFO] [stdout] 87 | | File::create( [INFO] [stdout] 88 | | self.data_location [INFO] [stdout] 89 | | .join(format!("{:04}.json", self.file_counter)), [INFO] [stdout] 90 | | ) [INFO] [stdout] 91 | | .await?, [INFO] [stdout] 92 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = note: this creates a needless allocation [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#replace_box [INFO] [stdout] = note: `#[warn(clippy::replace_box)]` on by default [INFO] [stdout] help: replace existing content with inner value instead [INFO] [stdout] | [INFO] [stdout] 86 ~ *self.file_reference = File::create( [INFO] [stdout] 87 + self.data_location [INFO] [stdout] 88 + .join(format!("{:04}.json", self.file_counter)), [INFO] [stdout] 89 + ) [INFO] [stdout] 90 ~ .await?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | return result; [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] 251 - return result; [INFO] [stdout] 251 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | data_fit.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 197 - data_fit.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] 197 + data_fit.sort_by_key(|a| a.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/frame_file_interface.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | current_t = current_t / 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `current_t /= 10` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] = note: `#[warn(clippy::assign_op_pattern)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/frame_file_interface.rs:139:9 [INFO] [stdout] | [INFO] [stdout] 139 | time = time / 10; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: replace it with: `time /= 10` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | / match v { [INFO] [stdout] 227 | | ArmAngles::LeftLow => true, [INFO] [stdout] 228 | | ArmAngles::LeftMid => true, [INFO] [stdout] 229 | | ArmAngles::LeftHigh => true, [INFO] [stdout] 230 | | _ => false, [INFO] [stdout] 231 | | } [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] 226 - match v { [INFO] [stdout] 227 - ArmAngles::LeftLow => true, [INFO] [stdout] 228 - ArmAngles::LeftMid => true, [INFO] [stdout] 229 - ArmAngles::LeftHigh => true, [INFO] [stdout] 230 - _ => false, [INFO] [stdout] 231 - } [INFO] [stdout] 226 + matches!(v, ArmAngles::LeftLow | ArmAngles::LeftMid | ArmAngles::LeftHigh) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | / match v { [INFO] [stdout] 241 | | ArmAngles::RightLow => true, [INFO] [stdout] 242 | | ArmAngles::RightMid => true, [INFO] [stdout] 243 | | ArmAngles::RightHigh => true, [INFO] [stdout] 244 | | _ => false, [INFO] [stdout] 245 | | } [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] 240 - match v { [INFO] [stdout] 241 - ArmAngles::RightLow => true, [INFO] [stdout] 242 - ArmAngles::RightMid => true, [INFO] [stdout] 243 - ArmAngles::RightHigh => true, [INFO] [stdout] 244 - _ => false, [INFO] [stdout] 245 - } [INFO] [stdout] 240 + matches!(v, ArmAngles::RightLow | ArmAngles::RightMid | ArmAngles::RightHigh) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:280:9 [INFO] [stdout] | [INFO] [stdout] 280 | return result; [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] 280 - return result; [INFO] [stdout] 280 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:268:46 [INFO] [stdout] | [INFO] [stdout] 268 | .filter(|(p, _l)| c.distance(*p) <= dist) [INFO] [stdout] | ^^ help: try: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:286:16 [INFO] [stdout] | [INFO] [stdout] 286 | if let Ok(_) = rx.try_recv() { [INFO] [stdout] | -------^^^^^---------------- help: try: `if rx.try_recv().is_ok()` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/circle_fit.rs:111:50 [INFO] [stdout] | [INFO] [stdout] 111 | let d = self.meb_center.distance(&p); [INFO] [stdout] | ^^ help: change this to: `p` [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 `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/circle_fit.rs:120:33 [INFO] [stdout] | [INFO] [stdout] 120 | let mut new_p = p.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*p` [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: manual implementation of an assign operation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | meb_radius = meb_radius + m.meb_radius; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `meb_radius += m.meb_radius` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:141:5 [INFO] [stdout] | [INFO] [stdout] 141 | meb_radius = meb_radius / balls; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `meb_radius /= balls` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | /// result [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 205 | /// result [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | /// optimal solution) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 207 | /// optimal solution) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | /// optimal solution) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 209 | /// optimal solution) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(gamma > 0. && gamma < 1. && (epsilon > 0.) && (delta < 1.) && (z > 0))` [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: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(gamma > 0. && gamma < 1. && (epsilon > 0.) && (delta < 1.))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(gamma > 0. && gamma < 1. && (epsilon > 0.))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:79 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^ help: try: `(z <= 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:43 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord [INFO] [stdout] = note: `#[warn(clippy::neg_cmp_op_on_partial_ord)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:62 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:336:9 [INFO] [stdout] | [INFO] [stdout] 336 | return n; [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] 336 - return n; [INFO] [stdout] 336 + n [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/circle_fit.rs:267:69 [INFO] [stdout] | [INFO] [stdout] 267 | let result = find_smallest_enclosing_ball_with_outliers(&pc, gamma, epsilon, delta, z); [INFO] [stdout] | ^^^ help: change this to: `pc` [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: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:350:9 [INFO] [stdout] | [INFO] [stdout] 350 | return Some(retval); [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] 350 - return Some(retval); [INFO] [stdout] 350 + Some(retval) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/circle_fit.rs:299:9 [INFO] [stdout] | [INFO] [stdout] 299 | return self.ball.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] 299 - return self.ball.clone(); [INFO] [stdout] 299 + self.ball.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/frame_file_interface.rs:344:16 [INFO] [stdout] | [INFO] [stdout] 344 | if self.kinect_buffer.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.kinect_buffer.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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/circle_fit.rs:334:5 [INFO] [stdout] | [INFO] [stdout] 334 | return Ok(smallest_balls[0].to_owned()); [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] 334 - return Ok(smallest_balls[0].to_owned()); [INFO] [stdout] 334 + Ok(smallest_balls[0].to_owned()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/circle_fit.rs:406:5 [INFO] [stdout] | [INFO] [stdout] 406 | / return Meb { [INFO] [stdout] 407 | | meb_center: o, [INFO] [stdout] 408 | | meb_radius: l, [INFO] [stdout] 409 | | }; [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] 406 ~ Meb { [INFO] [stdout] 407 + meb_center: o, [INFO] [stdout] 408 + meb_radius: l, [INFO] [stdout] 409 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/circle_fit.rs:355:30 [INFO] [stdout] | [INFO] [stdout] 355 | let (x, y, z) = (p.x as f32, p.y as f32, p.z as f32); [INFO] [stdout] | ^^^^^^^^^^ help: try: `p.x` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/circle_fit.rs:355:42 [INFO] [stdout] | [INFO] [stdout] 355 | let (x, y, z) = (p.x as f32, p.y as f32, p.z as f32); [INFO] [stdout] | ^^^^^^^^^^ help: try: `p.y` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/circle_fit.rs:355:54 [INFO] [stdout] | [INFO] [stdout] 355 | let (x, y, z) = (p.x as f32, p.y as f32, p.z as f32); [INFO] [stdout] | ^^^^^^^^^^ help: try: `p.z` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/circle_fit.rs:393:58 [INFO] [stdout] | [INFO] [stdout] 393 | P.iter_mut().for_each(|(p, dist)| *dist = o.distance(&p)); [INFO] [stdout] | ^^ help: change this to: `p` [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 `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:56:48 [INFO] [stdout] | [INFO] [stdout] 56 | self.frame_centroids.lock().await.push(frame_cent.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `frame_cent` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | return centroid.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] 83 - return centroid.clone(); [INFO] [stdout] 83 + centroid.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | return centroid.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*centroid` [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: length comparison to zero [INFO] [stdout] --> src/frame_file_interface.rs:428:16 [INFO] [stdout] | [INFO] [stdout] 428 | if ffr.frame_queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `ffr.frame_queue.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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/frame_filters.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return frames_lock.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] 37 - return frames_lock.clone(); [INFO] [stdout] 37 + frames_lock.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/frame_file_interface.rs:456:9 [INFO] [stdout] | [INFO] [stdout] 456 | file_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] = note: `#[warn(clippy::unnecessary_sort_by)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 456 - file_vec.sort_by(|a, b| a.file_name().cmp(&b.file_name())); [INFO] [stdout] 456 + file_vec.sort_by_key(|a| a.file_name()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:486:9 [INFO] [stdout] | [INFO] [stdout] 486 | return self.frame_queue.pop_front(); [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] 486 - return self.frame_queue.pop_front(); [INFO] [stdout] 486 + self.frame_queue.pop_front() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/frame_file_interface.rs:478:42 [INFO] [stdout] | [INFO] [stdout] 478 | if self.file_itter.len() == 0 && self.frame_queue.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `self.frame_queue.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: this `if` statement can be collapsed [INFO] [stdout] --> src/frame_file_interface.rs:481:9 [INFO] [stdout] | [INFO] [stdout] 481 | / if self.frame_queue.len() < MIN_NUM_BUFFERED_FRAMES { [INFO] [stdout] 482 | | if self.file_itter.len() > 0 { [INFO] [stdout] 483 | | _ = self.read_one_file().await; [INFO] [stdout] 484 | | } [INFO] [stdout] 485 | | } [INFO] [stdout] | |_________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 481 ~ if self.frame_queue.len() < MIN_NUM_BUFFERED_FRAMES [INFO] [stdout] 482 ~ && self.file_itter.len() > 0 { [INFO] [stdout] 483 | _ = self.read_one_file().await; [INFO] [stdout] 484 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/pre_processor/frame_filters.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if t_weight < 0. || t_weight > 1. { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0. ..=1.).contains(&t_weight)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `frames_snapshot.len() - 1` and has therefore no effect [INFO] [stdout] --> src/pre_processor/frame_filters.rs:75:25 [INFO] [stdout] | [INFO] [stdout] 75 | let frame_num = 0.max(frames_snapshot.len() - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `frames_snapshot.len() - 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/frame_filters.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | (ts as f32) / t_thresh * t_weight + (ds as f32) / d_thresh * (1. - t_weight) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `ts` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/frame_filters.rs:82:53 [INFO] [stdout] | [INFO] [stdout] 82 | (ts as f32) / t_thresh * t_weight + (ds as f32) / d_thresh * (1. - t_weight) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `ds` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pre_processor/frame_filters.rs:105:17 [INFO] [stdout] | [INFO] [stdout] 105 | frames: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 105 - frames: &Vec, [INFO] [stdout] 105 + frames: &[PointCloud], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/frame_filters.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return Result::Ok(actual.to_vec()); [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] 131 - return Result::Ok(actual.to_vec()); [INFO] [stdout] 131 + Result::Ok(actual.to_vec()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `frames` [INFO] [stdout] --> src/pre_processor/frame_filters.rs:109:22 [INFO] [stdout] | [INFO] [stdout] 109 | for i in 0..frames.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 109 - for i in 0..frames.len() { [INFO] [stdout] 109 + for (i, ) in frames.iter().enumerate() { [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/pre_processor/frame_filters.rs:178:55 [INFO] [stdout] | [INFO] [stdout] 178 | async fn temporal_score(&self, dist: f32, frames: &Vec) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 178 - async fn temporal_score(&self, dist: f32, frames: &Vec) -> Vec { [INFO] [stdout] 178 + async fn temporal_score(&self, dist: f32, frames: &[PointCloud]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `frames_snapshot.len() - 1` and has therefore no effect [INFO] [stdout] --> src/pre_processor/frame_filters.rs:208:25 [INFO] [stdout] | [INFO] [stdout] 208 | let frame_num = 0.max(frames_snapshot.len() - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `frames_snapshot.len() - 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | /// context clues, like the constant spanwidth of a person (if you find points) [INFO] [stdout] | ^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | /// tracing a circle, then the center of the circle is the body center, cause [INFO] [stdout] | ^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | /// thats how humans work [INFO] [stdout] | ^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | /// torso location and use that. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | /// The torso centroid location. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try using ` ` (7 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return kernel_val; [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] 98 - return kernel_val; [INFO] [stdout] 98 + kernel_val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MEB` contains a capitalized acronym [INFO] [stdout] --> src/pre_processor/initializables.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | MEB { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Meb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/frame_file_interface.rs:613:5 [INFO] [stdout] | [INFO] [stdout] 613 | return 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] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 613 - return 0; [INFO] [stdout] 613 + 0 [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/ipc.rs:112:21 [INFO] [stdout] | [INFO] [stdout] 112 | / if CONSTANTS.save_ground_truth_to_file { [INFO] [stdout] 113 | | if let Some(ref mut f) = ground_truth_file { [INFO] [stdout] 114 | | // Get angles, get prediction and get printable line [INFO] [stdout] 115 | | let angles = kinect_data.get_arm_angles(); [INFO] [stdout] ... | [INFO] [stdout] 127 | | } [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] 109 ~ IpcPacket::Kinect(kinect_data) [INFO] [stdout] 110 | // Calculate with internal function [INFO] [stdout] 111 | // kinect_data.calculate_ground_truth [INFO] [stdout] 112 ~ if CONSTANTS.save_ground_truth_to_file => { [INFO] [stdout] 113 | if let Some(ref mut f) = ground_truth_file { [INFO] [stdout] ... [INFO] [stdout] 126 | } [INFO] [stdout] 127 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MEB` contains a capitalized acronym [INFO] [stdout] --> src/pre_processor/initializables.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | MEB(MebInterface), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Meb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/pre_processor/initializables.rs:53:38 [INFO] [stdout] | [INFO] [stdout] 53 | pub async fn into_initializables(&self) -> Initializables { [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/initializables.rs:219:9 [INFO] [stdout] | [INFO] [stdout] 219 | return Ok(()); [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] 219 - return Ok(()); [INFO] [stdout] 219 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/initializables.rs:188:25 [INFO] [stdout] | [INFO] [stdout] 188 | return Some(dir_path); [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] 188 - return Some(dir_path); [INFO] [stdout] 188 + Some(dir_path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/pre_processor/initializables.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | / let _ = file [INFO] [stdout] 215 | | .write_all(serialized_data.into_bytes().as_slice()) [INFO] [stdout] 216 | | .await [INFO] [stdout] 217 | | .unwrap(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 214 - let _ = file [INFO] [stdout] 214 + file [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/pre_processor/initializables.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | / match serde_json::from_str(data.as_str()) { [INFO] [stdout] 252 | | Ok(v) => Some(v), [INFO] [stdout] 253 | | Err(_) => None, [INFO] [stdout] 254 | | } [INFO] [stdout] | |_________^ help: replace with: `serde_json::from_str(data.as_str()).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::io::Error` [INFO] [stdout] --> src/ipc.rs:234:28 [INFO] [stdout] | [INFO] [stdout] 234 | return Err(e.into()); [INFO] [stdout] | ^^^^^^^^ help: consider removing `.into()`: `e` [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] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/pre_processor/torso_remover.rs:22:31 [INFO] [stdout] | [INFO] [stdout] 22 | pub async fn into_message(&self) -> TorsoRecord { [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: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/torso_remover.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | torso_centroid: self.torso_centroid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.torso_centroid` [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: clamp-like pattern without using clamp function [INFO] [stdout] --> src/pc_math.rs:21:23 [INFO] [stdout] | [INFO] [stdout] 21 | let clamped_cos = cos_angle.max(-1.0).min(1.0); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with clamp: `cos_angle.clamp(-1.0, 1.0)` [INFO] [stdout] | [INFO] [stdout] = note: clamp will panic if max < min, min.is_nan(), or max.is_nan() [INFO] [stdout] = note: clamp returns NaN if the input is NaN [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_clamp [INFO] [stdout] = note: `#[warn(clippy::manual_clamp)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pc_math.rs:26:52 [INFO] [stdout] | [INFO] [stdout] 26 | pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [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] 26 - pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [INFO] [stdout] 26 + pub async fn calculate_points_centroid(datapoints: &[PointCloudPoint]) -> PointCloudPoint { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/torso_remover.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return Ok(torso_remover); [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] 121 - return Ok(torso_remover); [INFO] [stdout] 121 + Ok(torso_remover) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pc_math.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | return if result.len() > 0 { result } else { datapoints }; [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] 107 - return if result.len() > 0 { result } else { datapoints }; [INFO] [stdout] 107 + if result.len() > 0 { result } else { datapoints } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pc_math.rs:107:15 [INFO] [stdout] | [INFO] [stdout] 107 | return if result.len() > 0 { result } else { datapoints }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.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: unneeded `return` statement [INFO] [stdout] --> src/pc_math.rs:168:5 [INFO] [stdout] | [INFO] [stdout] 168 | return high; [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] 168 - return high; [INFO] [stdout] 168 + high [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/torso_remover.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | return (point_cloud, vec![PointLabels::Unlabeled; pc_len]); [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] 175 - return (point_cloud, vec![PointLabels::Unlabeled; pc_len]); [INFO] [stdout] 175 + (point_cloud, vec![PointLabels::Unlabeled; pc_len]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pre_processor/torso_remover.rs:156:28 [INFO] [stdout] | [INFO] [stdout] 156 | if dist_index_tuple.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `dist_index_tuple.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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/adaptive_kalman.rs:56:9 [INFO] [stdout] | [INFO] [stdout] 56 | return self.x; [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] 56 - return self.x; [INFO] [stdout] 56 + self.x [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/pre_processor/torso_remover.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | pub async fn into_initializable(&self) -> Initializables { [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/pre_processor/angle_to_note.rs:151:70 [INFO] [stdout] | [INFO] [stdout] 151 | let calc_left = AngleNoteGenerator::get_zone_index(&zones.0, &angles); [INFO] [stdout] | ^^^^^^^ help: change this to: `angles` [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/pre_processor.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | &mut frame_receiver, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `frame_receiver` [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/pre_processor/angle_to_note.rs:152:71 [INFO] [stdout] | [INFO] [stdout] 152 | let calc_right = AngleNoteGenerator::get_zone_index(&zones.1, &angles); [INFO] [stdout] | ^^^^^^^ help: change this to: `angles` [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/pre_processor.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | torso_remover_pre_config(&mut frame_receiver, filtered_data_sender).await, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `frame_receiver` [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/pre_processor.rs:129:45 [INFO] [stdout] | [INFO] [stdout] 129 | Initialized::MEB(meb_pre_config(&mut frame_receiver, filtered_data_sender).await) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `frame_receiver` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:230:5 [INFO] [stdout] | [INFO] [stdout] 230 | return arm_localizer; [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] 230 - return arm_localizer; [INFO] [stdout] 230 + arm_localizer [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()` [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:232:13 [INFO] [stdout] | [INFO] [stdout] 232 | / int_zones [INFO] [stdout] 233 | | .get_mut(idx - 1) [INFO] [stdout] 234 | | .map(|z| z.move_end_deg(-move_dist)); [INFO] [stdout] | |____________________________________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn [INFO] [stdout] = note: `#[warn(clippy::option_map_unit_fn)]` on by default [INFO] [stdout] help: use `if let` instead [INFO] [stdout] | [INFO] [stdout] 232 ~ if let Some(z) = int_zones [INFO] [stdout] 233 + .get_mut(idx - 1) { z.move_end_deg(-move_dist) } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:194:25 [INFO] [stdout] | [INFO] [stdout] 194 | return Some(mmw_frame) [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] 194 - return Some(mmw_frame) [INFO] [stdout] 194 + Some(mmw_frame) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:196:25 [INFO] [stdout] | [INFO] [stdout] 196 | return None [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] 196 - return None [INFO] [stdout] 196 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:278:117 [INFO] [stdout] | [INFO] [stdout] 278 | debug!(target: "angle_to_note", "Did NOT SELECT zone {:?} ({:?}), with weight {:?}", idx, zones[idx.clone()], w); [INFO] [stdout] | ^^^^^^^^^^^ help: try dereferencing it: `(*idx)` [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: using `clone` on type `usize` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/angle_to_note.rs:283:108 [INFO] [stdout] | [INFO] [stdout] 283 | debug!(target: "angle_to_note", "Selected zone {:?} ({:?}), with weight: {:?}", idx, zones[idx.clone()], w); [INFO] [stdout] | ^^^^^^^^^^^ help: try removing the `clone` call: `idx` [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: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/pre_processor/arm_angle_calculator.rs:47:12 [INFO] [stdout] | [INFO] [stdout] 47 | if dist > 1.3 || dist < 0.3 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0.3..=1.3).contains(&dist)` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pre_processor/arm_angle_calculator.rs:80:45 [INFO] [stdout] | [INFO] [stdout] 80 | pub async fn update_arm2(&self, points: &Vec) -> (f32, f32) { [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] 80 - pub async fn update_arm2(&self, points: &Vec) -> (f32, f32) { [INFO] [stdout] 80 + pub async fn update_arm2(&self, points: &[PointCloudPoint]) -> (f32, f32) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pre_processor/arm_angle_calculator.rs:87:12 [INFO] [stdout] | [INFO] [stdout] 87 | if left.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!left.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/pre_processor/arm_angle_calculator.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | if right.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!right.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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | return torso_rem; [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] 298 - return torso_rem; [INFO] [stdout] 298 + torso_rem [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor.rs:380:61 [INFO] [stdout] | [INFO] [stdout] 380 | let mut locations = arm_filter.fit_data(&pc, &labs).await; [INFO] [stdout] | ^^^ help: change this to: `pc` [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/pre_processor.rs:380:66 [INFO] [stdout] | [INFO] [stdout] 380 | let mut locations = arm_filter.fit_data(&pc, &labs).await; [INFO] [stdout] | ^^^^^ help: change this to: `labs` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:142:9 [INFO] [stdout] | [INFO] [stdout] 142 | / return Ok(ArmLocalizer { [INFO] [stdout] 143 | | left_low: ll, [INFO] [stdout] 144 | | right_low: rl, [INFO] [stdout] 145 | | left_middle: lm, [INFO] [stdout] ... | [INFO] [stdout] 149 | | init_data: init_data, [INFO] [stdout] 150 | | }); [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] 142 ~ Ok(ArmLocalizer { [INFO] [stdout] 143 + left_low: ll, [INFO] [stdout] 144 + right_low: rl, [INFO] [stdout] 145 + left_middle: lm, [INFO] [stdout] 146 + right_middle: rm, [INFO] [stdout] 147 + left_high: lh, [INFO] [stdout] 148 + right_high: rh, [INFO] [stdout] 149 + init_data: init_data, [INFO] [stdout] 150 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 95 | | "When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 96 | | `Initializables::ArmLocations` enum variant" [INFO] [stdout] 97 | | ) [INFO] [stdout] 98 | | .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] 94 ~ return Err(format!( [INFO] [stdout] 95 + "When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 96 + `Initializables::ArmLocations` enum variant" [INFO] [stdout] 97 ~ )); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:94:24 [INFO] [stdout] | [INFO] [stdout] 94 | return Err(format!( [INFO] [stdout] | ________________________^ [INFO] [stdout] 95 | | "When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 96 | | `Initializables::ArmLocations` enum variant" [INFO] [stdout] 97 | | ) [INFO] [stdout] | |_____________^ [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] help: consider using `.to_string()` [INFO] [stdout] | [INFO] [stdout] 94 ~ return Err("When constructing a `ArmLocalizer` you may only provide the \ [INFO] [stdout] 95 + `Initializables::ArmLocations` enum variant".to_string() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:131:13 [INFO] [stdout] | [INFO] [stdout] 131 | return (left, right); [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] 131 - return (left, right); [INFO] [stdout] 131 + (left, right) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | return result; [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] 251 - return result; [INFO] [stdout] 251 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: consider using `sort_by_key` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:197:9 [INFO] [stdout] | [INFO] [stdout] 197 | data_fit.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_sort_by [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 197 - data_fit.sort_by(|a, b| a.1.cmp(&b.1)); [INFO] [stdout] 197 + data_fit.sort_by_key(|a| a.1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:226:21 [INFO] [stdout] | [INFO] [stdout] 226 | / match v { [INFO] [stdout] 227 | | ArmAngles::LeftLow => true, [INFO] [stdout] 228 | | ArmAngles::LeftMid => true, [INFO] [stdout] 229 | | ArmAngles::LeftHigh => true, [INFO] [stdout] 230 | | _ => false, [INFO] [stdout] 231 | | } [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] 226 - match v { [INFO] [stdout] 227 - ArmAngles::LeftLow => true, [INFO] [stdout] 228 - ArmAngles::LeftMid => true, [INFO] [stdout] 229 - ArmAngles::LeftHigh => true, [INFO] [stdout] 230 - _ => false, [INFO] [stdout] 231 - } [INFO] [stdout] 226 + matches!(v, ArmAngles::LeftLow | ArmAngles::LeftMid | ArmAngles::LeftHigh) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:240:21 [INFO] [stdout] | [INFO] [stdout] 240 | / match v { [INFO] [stdout] 241 | | ArmAngles::RightLow => true, [INFO] [stdout] 242 | | ArmAngles::RightMid => true, [INFO] [stdout] 243 | | ArmAngles::RightHigh => true, [INFO] [stdout] 244 | | _ => false, [INFO] [stdout] 245 | | } [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] 240 - match v { [INFO] [stdout] 241 - ArmAngles::RightLow => true, [INFO] [stdout] 242 - ArmAngles::RightMid => true, [INFO] [stdout] 243 - ArmAngles::RightHigh => true, [INFO] [stdout] 244 - _ => false, [INFO] [stdout] 245 - } [INFO] [stdout] 240 + matches!(v, ArmAngles::RightLow | ArmAngles::RightMid | ArmAngles::RightHigh) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:280:9 [INFO] [stdout] | [INFO] [stdout] 280 | return result; [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] 280 - return result; [INFO] [stdout] 280 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:268:46 [INFO] [stdout] | [INFO] [stdout] 268 | .filter(|(p, _l)| c.distance(*p) <= dist) [INFO] [stdout] | ^^ help: try: `p` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stdout] --> src/pre_processor/arm_location_initializer.rs:286:16 [INFO] [stdout] | [INFO] [stdout] 286 | if let Ok(_) = rx.try_recv() { [INFO] [stdout] | -------^^^^^---------------- help: try: `if rx.try_recv().is_ok()` [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: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor.rs:575:9 [INFO] [stdout] | [INFO] [stdout] 575 | torso_remover.torso_centroid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `torso_remover.torso_centroid` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/circle_fit.rs:111:50 [INFO] [stdout] | [INFO] [stdout] 111 | let d = self.meb_center.distance(&p); [INFO] [stdout] | ^^ help: change this to: `p` [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 `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/circle_fit.rs:120:33 [INFO] [stdout] | [INFO] [stdout] 120 | let mut new_p = p.clone(); [INFO] [stdout] | ^^^^^^^^^ help: try dereferencing it: `*p` [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: manual implementation of an assign operation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | meb_radius = meb_radius + m.meb_radius; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `meb_radius += m.meb_radius` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:141:5 [INFO] [stdout] | [INFO] [stdout] 141 | meb_radius = meb_radius / balls; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `meb_radius /= balls` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `(f32, f32)` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor.rs:635:39 [INFO] [stdout] | [INFO] [stdout] 635 | let midi_angles = angles.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*angles` [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: doc list item without indentation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:205:9 [INFO] [stdout] | [INFO] [stdout] 205 | /// result [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 205 | /// result [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:669:5 [INFO] [stdout] | [INFO] [stdout] 669 | return mmw_frame; [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] 669 - return mmw_frame; [INFO] [stdout] 669 + mmw_frame [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor.rs:665:33 [INFO] [stdout] | [INFO] [stdout] 665 | centroid_calc.add_frame(&pc).await; [INFO] [stdout] | ^^^ help: change this to: `pc` [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: doc list item without indentation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:207:9 [INFO] [stdout] | [INFO] [stdout] 207 | /// optimal solution) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 207 | /// optimal solution) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/pre_processor/circle_fit.rs:209:9 [INFO] [stdout] | [INFO] [stdout] 209 | /// optimal solution) [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 209 | /// optimal solution) [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:678:5 [INFO] [stdout] | [INFO] [stdout] 678 | return mmw_frame; [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] 678 - return mmw_frame; [INFO] [stdout] 678 + mmw_frame [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(gamma > 0. && gamma < 1. && (epsilon > 0.) && (delta < 1.) && (z > 0))` [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: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(gamma > 0. && gamma < 1. && (epsilon > 0.) && (delta < 1.))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:12 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `!(gamma > 0. && gamma < 1. && (epsilon > 0.))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:79 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^ help: try: `(z <= 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:43 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord [INFO] [stdout] = note: `#[warn(clippy::neg_cmp_op_on_partial_ord)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the use of negated comparison operators on partially ordered types produces code that is hard to read and refactor, please consider using the `partial_cmp` method instead, to make it clear that the two values could be incomparable [INFO] [stdout] --> src/pre_processor/circle_fit.rs:230:62 [INFO] [stdout] | [INFO] [stdout] 230 | if !(gamma > 0. && gamma < 1.) || !(epsilon > 0.) || !(delta < 1.) || !(z > 0) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_cmp_op_on_partial_ord [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/circle_fit.rs:267:69 [INFO] [stdout] | [INFO] [stdout] 267 | let result = find_smallest_enclosing_ball_with_outliers(&pc, gamma, epsilon, delta, z); [INFO] [stdout] | ^^^ help: change this to: `pc` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/circle_fit.rs:299:9 [INFO] [stdout] | [INFO] [stdout] 299 | return self.ball.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] 299 - return self.ball.clone(); [INFO] [stdout] 299 + self.ball.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/circle_fit.rs:334:5 [INFO] [stdout] | [INFO] [stdout] 334 | return Ok(smallest_balls[0].to_owned()); [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] 334 - return Ok(smallest_balls[0].to_owned()); [INFO] [stdout] 334 + Ok(smallest_balls[0].to_owned()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/circle_fit.rs:406:5 [INFO] [stdout] | [INFO] [stdout] 406 | / return Meb { [INFO] [stdout] 407 | | meb_center: o, [INFO] [stdout] 408 | | meb_radius: l, [INFO] [stdout] 409 | | }; [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] 406 ~ Meb { [INFO] [stdout] 407 + meb_center: o, [INFO] [stdout] 408 + meb_radius: l, [INFO] [stdout] 409 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/circle_fit.rs:355:30 [INFO] [stdout] | [INFO] [stdout] 355 | let (x, y, z) = (p.x as f32, p.y as f32, p.z as f32); [INFO] [stdout] | ^^^^^^^^^^ help: try: `p.x` [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: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/pre_processor.rs:717:59 [INFO] [stdout] | [INFO] [stdout] 717 | let unique_labels: Vec = labels.as_slice().into_iter().fold( [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: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/circle_fit.rs:355:42 [INFO] [stdout] | [INFO] [stdout] 355 | let (x, y, z) = (p.x as f32, p.y as f32, p.z as f32); [INFO] [stdout] | ^^^^^^^^^^ help: try: `p.y` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/circle_fit.rs:355:54 [INFO] [stdout] | [INFO] [stdout] 355 | let (x, y, z) = (p.x as f32, p.y as f32, p.z as f32); [INFO] [stdout] | ^^^^^^^^^^ help: try: `p.z` [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: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor/circle_fit.rs:393:58 [INFO] [stdout] | [INFO] [stdout] 393 | P.iter_mut().for_each(|(p, dist)| *dist = o.distance(&p)); [INFO] [stdout] | ^^ help: change this to: `p` [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 `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pre_processor.rs:765:38 [INFO] [stdout] | [INFO] [stdout] 765 | async fn dbscan_get_arms(datapoints: &Vec) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 765 - async fn dbscan_get_arms(datapoints: &Vec) -> Vec { [INFO] [stdout] 765 + async fn dbscan_get_arms(datapoints: &[PointCloudPoint]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/tlv_frame_reader.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | fn into_point(&self) -> PointCloudPoint { [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: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:56:48 [INFO] [stdout] | [INFO] [stdout] 56 | self.frame_centroids.lock().await.push(frame_cent.clone()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `frame_cent` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:83:9 [INFO] [stdout] | [INFO] [stdout] 83 | return centroid.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] 83 - return centroid.clone(); [INFO] [stdout] 83 + centroid.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/cumulative_centroid_finder.rs:83:16 [INFO] [stdout] | [INFO] [stdout] 83 | return centroid.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try dereferencing it: `*centroid` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/frame_filters.rs:37:9 [INFO] [stdout] | [INFO] [stdout] 37 | return frames_lock.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] 37 - return frames_lock.clone(); [INFO] [stdout] 37 + frames_lock.clone() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tlv_frame_reader.rs:175:5 [INFO] [stdout] | [INFO] [stdout] 175 | return result; [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] 175 - return result; [INFO] [stdout] 175 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tlv_frame_reader.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 261 | return retval; [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] 261 - return retval; [INFO] [stdout] 261 + retval [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/pre_processor/frame_filters.rs:72:12 [INFO] [stdout] | [INFO] [stdout] 72 | if t_weight < 0. || t_weight > 1. { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use: `!(0. ..=1.).contains(&t_weight)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_range_contains [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/tlv_frame_reader.rs:229:34 [INFO] [stdout] | [INFO] [stdout] 229 | fn into_trackable_entity(&self) -> TrackableEntity { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tlv_translator.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | fn is_magic(input: &Vec, index: usize) -> bool { [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] 19 - fn is_magic(input: &Vec, index: usize) -> bool { [INFO] [stdout] 19 + fn is_magic(input: &[u8], index: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/tlv_translator.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | &input[index..(index + 8)] == MAGIC_WORD [INFO] [stdout] | --------------------------^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `input[index..(index + 8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `frames_snapshot.len() - 1` and has therefore no effect [INFO] [stdout] --> src/pre_processor/frame_filters.rs:75:25 [INFO] [stdout] | [INFO] [stdout] 75 | let frame_num = 0.max(frames_snapshot.len() - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `frames_snapshot.len() - 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] = note: `#[warn(clippy::unnecessary_min_or_max)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: casting to the same type is unnecessary (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/frame_filters.rs:82:17 [INFO] [stdout] | [INFO] [stdout] 82 | (ts as f32) / t_thresh * t_weight + (ds as f32) / d_thresh * (1. - t_weight) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `ts` [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 (`f32` -> `f32`) [INFO] [stdout] --> src/pre_processor/frame_filters.rs:82:53 [INFO] [stdout] | [INFO] [stdout] 82 | (ts as f32) / t_thresh * t_weight + (ds as f32) / d_thresh * (1. - t_weight) [INFO] [stdout] | ^^^^^^^^^^^ help: try: `ds` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pre_processor/frame_filters.rs:105:17 [INFO] [stdout] | [INFO] [stdout] 105 | frames: &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] help: change this to [INFO] [stdout] | [INFO] [stdout] 105 - frames: &Vec, [INFO] [stdout] 105 + frames: &[PointCloud], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/frame_filters.rs:131:9 [INFO] [stdout] | [INFO] [stdout] 131 | return Result::Ok(actual.to_vec()); [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] 131 - return Result::Ok(actual.to_vec()); [INFO] [stdout] 131 + Result::Ok(actual.to_vec()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `frames` [INFO] [stdout] --> src/pre_processor/frame_filters.rs:109:22 [INFO] [stdout] | [INFO] [stdout] 109 | for i in 0..frames.len() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] = note: `#[warn(clippy::needless_range_loop)]` on by default [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 109 - for i in 0..frames.len() { [INFO] [stdout] 109 + for (i, ) in frames.iter().enumerate() { [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/pre_processor/frame_filters.rs:178:55 [INFO] [stdout] | [INFO] [stdout] 178 | async fn temporal_score(&self, dist: f32, frames: &Vec) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 178 - async fn temporal_score(&self, dist: f32, frames: &Vec) -> Vec { [INFO] [stdout] 178 + async fn temporal_score(&self, dist: f32, frames: &[PointCloud]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: `0` is never greater than `frames_snapshot.len() - 1` and has therefore no effect [INFO] [stdout] --> src/pre_processor/frame_filters.rs:208:25 [INFO] [stdout] | [INFO] [stdout] 208 | let frame_num = 0.max(frames_snapshot.len() - 1); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `frames_snapshot.len() - 1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_min_or_max [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | /// context clues, like the constant spanwidth of a person (if you find points) [INFO] [stdout] | ^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] = note: `#[warn(clippy::doc_overindented_list_items)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:56:5 [INFO] [stdout] | [INFO] [stdout] 56 | /// tracing a circle, then the center of the circle is the body center, cause [INFO] [stdout] | ^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | /// thats how humans work [INFO] [stdout] | ^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | /// torso location and use that. [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | /// The torso centroid location. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: try using ` ` (7 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | /// representing the tlv bytes which should [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | /// be parsed. All data which is consumed [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | /// (and thus translated into a point cloud [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | /// ) will be removed from the `tlv_bytes` [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/hand_weigher.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return kernel_val; [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] 98 - return kernel_val; [INFO] [stdout] 98 + kernel_val [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | /// variable in this process will [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MEB` contains a capitalized acronym [INFO] [stdout] --> src/pre_processor/initializables.rs:38:5 [INFO] [stdout] | [INFO] [stdout] 38 | MEB { [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Meb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] = note: `#[warn(clippy::upper_case_acronyms)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tlv_translator.rs:177:8 [INFO] [stdout] | [INFO] [stdout] 177 | if result.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.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: doc list item without indentation [INFO] [stdout] --> src/tlv_translator.rs:196:5 [INFO] [stdout] | [INFO] [stdout] 196 | /// Or `None` if the frame is not complete. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 196 | /// Or `None` if the frame is not complete. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tlv_translator.rs:320:5 [INFO] [stdout] | [INFO] [stdout] 320 | return frame; [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] 320 - return frame; [INFO] [stdout] 320 + frame [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MEB` contains a capitalized acronym [INFO] [stdout] --> src/pre_processor/initializables.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | MEB(MebInterface), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Meb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/pre_processor/initializables.rs:53:38 [INFO] [stdout] | [INFO] [stdout] 53 | pub async fn into_initializables(&self) -> Initializables { [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/initializables.rs:219:9 [INFO] [stdout] | [INFO] [stdout] 219 | return Ok(()); [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] 219 - return Ok(()); [INFO] [stdout] 219 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/initializables.rs:188:25 [INFO] [stdout] | [INFO] [stdout] 188 | return Some(dir_path); [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] 188 - return Some(dir_path); [INFO] [stdout] 188 + Some(dir_path) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this let-binding has unit value [INFO] [stdout] --> src/pre_processor/initializables.rs:214:9 [INFO] [stdout] | [INFO] [stdout] 214 | / let _ = file [INFO] [stdout] 215 | | .write_all(serialized_data.into_bytes().as_slice()) [INFO] [stdout] 216 | | .await [INFO] [stdout] 217 | | .unwrap(); [INFO] [stdout] | |______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_unit_value [INFO] [stdout] = note: `#[warn(clippy::let_unit_value)]` on by default [INFO] [stdout] help: omit the `let` binding [INFO] [stdout] | [INFO] [stdout] 214 - let _ = file [INFO] [stdout] 214 + file [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `ok` [INFO] [stdout] --> src/pre_processor/initializables.rs:251:9 [INFO] [stdout] | [INFO] [stdout] 251 | / match serde_json::from_str(data.as_str()) { [INFO] [stdout] 252 | | Ok(v) => Some(v), [INFO] [stdout] 253 | | Err(_) => None, [INFO] [stdout] 254 | | } [INFO] [stdout] | |_________^ help: replace with: `serde_json::from_str(data.as_str()).ok()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_ok_err [INFO] [stdout] = note: `#[warn(clippy::manual_ok_err)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/pre_processor/torso_remover.rs:22:31 [INFO] [stdout] | [INFO] [stdout] 22 | pub async fn into_message(&self) -> TorsoRecord { [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: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor/torso_remover.rs:25:29 [INFO] [stdout] | [INFO] [stdout] 25 | torso_centroid: self.torso_centroid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.torso_centroid` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tlv_translator.rs:325:23 [INFO] [stdout] | [INFO] [stdout] 325 | fn read_header(input: &Vec) -> Option { [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] 325 - fn read_header(input: &Vec) -> Option { [INFO] [stdout] 325 + fn read_header(input: &[u8]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/types.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn into_string(&self, timestamp: u128) -> String { [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: large size difference between variants [INFO] [stdout] --> src/types.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | / pub enum IpcPacket { [INFO] [stdout] 108 | | Kinect(KinectData), [INFO] [stdout] | | ------------------ the largest variant contains at least 528 bytes [INFO] [stdout] 109 | | Mmw(MmwFrame), [INFO] [stdout] 110 | | Torso(TorsoRecord), [INFO] [stdout] 111 | | ArmsLocations(ArmLocalizer), [INFO] [stdout] | | --------------------------- the second-largest variant contains at least 224 bytes [INFO] [stdout] 112 | | ArmPredictions(ArmPredictionMessage), [INFO] [stdout] 113 | | MEB(Meb), [INFO] [stdout] 114 | | } [INFO] [stdout] | |_^ the entire enum is at least 544 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] 108 - Kinect(KinectData), [INFO] [stdout] 108 + Kinect(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MEB` contains a capitalized acronym [INFO] [stdout] --> src/types.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | MEB(Meb), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Meb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/torso_remover.rs:121:9 [INFO] [stdout] | [INFO] [stdout] 121 | return Ok(torso_remover); [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] 121 - return Ok(torso_remover); [INFO] [stdout] 121 + Ok(torso_remover) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor/torso_remover.rs:175:9 [INFO] [stdout] | [INFO] [stdout] 175 | return (point_cloud, vec![PointLabels::Unlabeled; pc_len]); [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] 175 - return (point_cloud, vec![PointLabels::Unlabeled; pc_len]); [INFO] [stdout] 175 + (point_cloud, vec![PointLabels::Unlabeled; pc_len]) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/pre_processor/torso_remover.rs:156:28 [INFO] [stdout] | [INFO] [stdout] 156 | if dist_index_tuple.len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `dist_index_tuple.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: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/pre_processor/torso_remover.rs:178:37 [INFO] [stdout] | [INFO] [stdout] 178 | pub async fn into_initializable(&self) -> Initializables { [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: unneeded `return` statement [INFO] [stdout] --> src/types.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | / return Ok(KinectData { [INFO] [stdout] 213 | | timestamp, [INFO] [stdout] 214 | | frame_num, [INFO] [stdout] 215 | | skeletal_points, [INFO] [stdout] 216 | | }); [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] 212 ~ Ok(KinectData { [INFO] [stdout] 213 + timestamp, [INFO] [stdout] 214 + frame_num, [INFO] [stdout] 215 + skeletal_points, [INFO] [stdout] 216 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `skeletal_points` [INFO] [stdout] --> src/types.rs:198:18 [INFO] [stdout] | [INFO] [stdout] 198 | for i in 0..25 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 198 - for i in 0..25 { [INFO] [stdout] 198 + for (i, ) in skeletal_points.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/types.rs:200:36 [INFO] [stdout] | [INFO] [stdout] 200 | let x: f32 = raw_parts[starting_point + 0].trim().parse()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `starting_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` 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/pre_processor.rs:113:21 [INFO] [stdout] | [INFO] [stdout] 113 | &mut frame_receiver, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `frame_receiver` [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/pre_processor.rs:124:42 [INFO] [stdout] | [INFO] [stdout] 124 | torso_remover_pre_config(&mut frame_receiver, filtered_data_sender).await, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `frame_receiver` [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/pre_processor.rs:129:45 [INFO] [stdout] | [INFO] [stdout] 129 | Initialized::MEB(meb_pre_config(&mut frame_receiver, filtered_data_sender).await) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: change this to: `frame_receiver` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:230:5 [INFO] [stdout] | [INFO] [stdout] 230 | return arm_localizer; [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] 230 - return arm_localizer; [INFO] [stdout] 230 + arm_localizer [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/types.rs:336:14 [INFO] [stdout] | [INFO] [stdout] 336 | .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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:194:25 [INFO] [stdout] | [INFO] [stdout] 194 | return Some(mmw_frame) [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] 194 - return Some(mmw_frame) [INFO] [stdout] 194 + Some(mmw_frame) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:196:25 [INFO] [stdout] | [INFO] [stdout] 196 | return None [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] 196 - return None [INFO] [stdout] 196 + None [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | return torso_rem; [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] 298 - return torso_rem; [INFO] [stdout] 298 + torso_rem [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types.rs:482:9 [INFO] [stdout] | [INFO] [stdout] 482 | return unsafe { pc_helper.pc }; [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] 482 - return unsafe { pc_helper.pc }; [INFO] [stdout] 482 + unsafe { pc_helper.pc } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor.rs:380:61 [INFO] [stdout] | [INFO] [stdout] 380 | let mut locations = arm_filter.fit_data(&pc, &labs).await; [INFO] [stdout] | ^^^ help: change this to: `pc` [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/pre_processor.rs:380:66 [INFO] [stdout] | [INFO] [stdout] 380 | let mut locations = arm_filter.fit_data(&pc, &labs).await; [INFO] [stdout] | ^^^^^ help: change this to: `labs` [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: unneeded `return` statement [INFO] [stdout] --> src/types.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 537 | return (dx.powi(2) + dy.powi(2) + dz.powi(2)).sqrt(); [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] 537 - return (dx.powi(2) + dy.powi(2) + dz.powi(2)).sqrt(); [INFO] [stdout] 537 + (dx.powi(2) + dy.powi(2) + dz.powi(2)).sqrt() [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/types.rs:540:56 [INFO] [stdout] | [INFO] [stdout] 540 | pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [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] 540 - pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [INFO] [stdout] 540 + pub async fn calculate_points_centroid(datapoints: &[PointCloudPoint]) -> PointCloudPoint { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types.rs:554:9 [INFO] [stdout] | [INFO] [stdout] 547 | / let centroid = PointCloudPoint { [INFO] [stdout] 548 | | x: accum_torso_centroid.0.x / accum_torso_centroid.1, [INFO] [stdout] 549 | | y: accum_torso_centroid.0.y / accum_torso_centroid.1, [INFO] [stdout] 550 | | z: accum_torso_centroid.0.z / accum_torso_centroid.1, [INFO] [stdout] 551 | | d: accum_torso_centroid.0.d / accum_torso_centroid.1, [INFO] [stdout] 552 | | w: accum_torso_centroid.0.w, [INFO] [stdout] 553 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 554 | centroid [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] 547 ~ [INFO] [stdout] 548 ~ PointCloudPoint { [INFO] [stdout] 549 + x: accum_torso_centroid.0.x / accum_torso_centroid.1, [INFO] [stdout] 550 + y: accum_torso_centroid.0.y / accum_torso_centroid.1, [INFO] [stdout] 551 + z: accum_torso_centroid.0.z / accum_torso_centroid.1, [INFO] [stdout] 552 + d: accum_torso_centroid.0.d / accum_torso_centroid.1, [INFO] [stdout] 553 + w: accum_torso_centroid.0.w, [INFO] [stdout] 554 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types.rs:724:9 [INFO] [stdout] | [INFO] [stdout] 724 | return Some(result); [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] 724 - return Some(result); [INFO] [stdout] 724 + Some(result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | /// the data from which a TLV header should [INFO] [stdout] | ^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:751:9 [INFO] [stdout] | [INFO] [stdout] 751 | /// be extracted [INFO] [stdout] | ^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:755:9 [INFO] [stdout] | [INFO] [stdout] 755 | /// from the input, the input is unchanged [INFO] [stdout] | ^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:757:9 [INFO] [stdout] | [INFO] [stdout] 757 | /// and removed the 8 bytes from which it was extracted [INFO] [stdout] | ^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:758:9 [INFO] [stdout] | [INFO] [stdout] 758 | /// from the input. [INFO] [stdout] | ^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:76:64 [INFO] [stdout] | [INFO] [stdout] 76 | let settings: Arc = Arc::new(Settings::from_file(&settings_path)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `settings_path` [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:114:59 [INFO] [stdout] | [INFO] [stdout] 114 | let config: Config = get_result(Config::from_file(&config_path)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `config_path` [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: `to_string` applied to a type that implements `Display` in `eprintln!` args [INFO] [stdout] --> src/main.rs:192:30 [INFO] [stdout] | [INFO] [stdout] 192 | eprintln!("{}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using `clone` on type `PointCloudPoint` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor.rs:575:9 [INFO] [stdout] | [INFO] [stdout] 575 | torso_remover.torso_centroid.clone(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `torso_remover.torso_centroid` [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: using `clone` on type `(f32, f32)` which implements the `Copy` trait [INFO] [stdout] --> src/pre_processor.rs:635:39 [INFO] [stdout] | [INFO] [stdout] 635 | let midi_angles = angles.clone(); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: try dereferencing it: `*angles` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:669:5 [INFO] [stdout] | [INFO] [stdout] 669 | return mmw_frame; [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] 669 - return mmw_frame; [INFO] [stdout] 669 + mmw_frame [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/pre_processor.rs:665:33 [INFO] [stdout] | [INFO] [stdout] 665 | centroid_calc.add_frame(&pc).await; [INFO] [stdout] | ^^^ help: change this to: `pc` [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: unneeded `return` statement [INFO] [stdout] --> src/pre_processor.rs:678:5 [INFO] [stdout] | [INFO] [stdout] 678 | return mmw_frame; [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] 678 - return mmw_frame; [INFO] [stdout] 678 + mmw_frame [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice` [INFO] [stdout] --> src/pre_processor.rs:717:59 [INFO] [stdout] | [INFO] [stdout] 717 | let unique_labels: Vec = labels.as_slice().into_iter().fold( [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/pre_processor.rs:765:38 [INFO] [stdout] | [INFO] [stdout] 765 | async fn dbscan_get_arms(datapoints: &Vec) -> 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] help: change this to [INFO] [stdout] | [INFO] [stdout] 765 - async fn dbscan_get_arms(datapoints: &Vec) -> Vec { [INFO] [stdout] 765 + async fn dbscan_get_arms(datapoints: &[PointCloudPoint]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/tlv_frame_reader.rs:14:23 [INFO] [stdout] | [INFO] [stdout] 14 | fn into_point(&self) -> PointCloudPoint { [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: unneeded `return` statement [INFO] [stdout] --> src/tlv_frame_reader.rs:175:5 [INFO] [stdout] | [INFO] [stdout] 175 | return result; [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] 175 - return result; [INFO] [stdout] 175 + result [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tlv_frame_reader.rs:261:5 [INFO] [stdout] | [INFO] [stdout] 261 | return retval; [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] 261 - return retval; [INFO] [stdout] 261 + retval [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/tlv_frame_reader.rs:229:34 [INFO] [stdout] | [INFO] [stdout] 229 | fn into_trackable_entity(&self) -> TrackableEntity { [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/tlv_translator.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | fn is_magic(input: &Vec, index: usize) -> bool { [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] 19 - fn is_magic(input: &Vec, index: usize) -> bool { [INFO] [stdout] 19 + fn is_magic(input: &[u8], index: usize) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: needlessly taken reference of left operand [INFO] [stdout] --> src/tlv_translator.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | &input[index..(index + 8)] == MAGIC_WORD [INFO] [stdout] | --------------------------^^^^^^^^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | help: use the left value directly: `input[index..(index + 8)]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:136:5 [INFO] [stdout] | [INFO] [stdout] 136 | /// representing the tlv bytes which should [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:137:5 [INFO] [stdout] | [INFO] [stdout] 137 | /// be parsed. All data which is consumed [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:138:5 [INFO] [stdout] | [INFO] [stdout] 138 | /// (and thus translated into a point cloud [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | /// ) will be removed from the `tlv_bytes` [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/tlv_translator.rs:140:5 [INFO] [stdout] | [INFO] [stdout] 140 | /// variable in this process will [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/tlv_translator.rs:177:8 [INFO] [stdout] | [INFO] [stdout] 177 | if result.len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!result.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: doc list item without indentation [INFO] [stdout] --> src/tlv_translator.rs:196:5 [INFO] [stdout] | [INFO] [stdout] 196 | /// Or `None` if the frame is not complete. [INFO] [stdout] | ^ [INFO] [stdout] | [INFO] [stdout] = help: if this is supposed to be its own paragraph, add a blank line [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation [INFO] [stdout] help: indent this line [INFO] [stdout] | [INFO] [stdout] 196 | /// Or `None` if the frame is not complete. [INFO] [stdout] | ++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/tlv_translator.rs:320:5 [INFO] [stdout] | [INFO] [stdout] 320 | return frame; [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] 320 - return frame; [INFO] [stdout] 320 + frame [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/tlv_translator.rs:325:23 [INFO] [stdout] | [INFO] [stdout] 325 | fn read_header(input: &Vec) -> Option { [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] 325 - fn read_header(input: &Vec) -> Option { [INFO] [stdout] 325 + fn read_header(input: &[u8]) -> Option { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods called `into_*` usually take `self` by value [INFO] [stdout] --> src/types.rs:92:24 [INFO] [stdout] | [INFO] [stdout] 92 | pub fn into_string(&self, timestamp: u128) -> String { [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: large size difference between variants [INFO] [stdout] --> src/types.rs:107:1 [INFO] [stdout] | [INFO] [stdout] 107 | / pub enum IpcPacket { [INFO] [stdout] 108 | | Kinect(KinectData), [INFO] [stdout] | | ------------------ the largest variant contains at least 528 bytes [INFO] [stdout] 109 | | Mmw(MmwFrame), [INFO] [stdout] 110 | | Torso(TorsoRecord), [INFO] [stdout] 111 | | ArmsLocations(ArmLocalizer), [INFO] [stdout] | | --------------------------- the second-largest variant contains at least 224 bytes [INFO] [stdout] 112 | | ArmPredictions(ArmPredictionMessage), [INFO] [stdout] 113 | | MEB(Meb), [INFO] [stdout] 114 | | } [INFO] [stdout] | |_^ the entire enum is at least 544 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] 108 - Kinect(KinectData), [INFO] [stdout] 108 + Kinect(Box), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: name `MEB` contains a capitalized acronym [INFO] [stdout] --> src/types.rs:113:5 [INFO] [stdout] | [INFO] [stdout] 113 | MEB(Meb), [INFO] [stdout] | ^^^ help: consider making the acronym lowercase, except the initial letter: `Meb` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#upper_case_acronyms [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types.rs:212:9 [INFO] [stdout] | [INFO] [stdout] 212 | / return Ok(KinectData { [INFO] [stdout] 213 | | timestamp, [INFO] [stdout] 214 | | frame_num, [INFO] [stdout] 215 | | skeletal_points, [INFO] [stdout] 216 | | }); [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] 212 ~ Ok(KinectData { [INFO] [stdout] 213 + timestamp, [INFO] [stdout] 214 + frame_num, [INFO] [stdout] 215 + skeletal_points, [INFO] [stdout] 216 ~ }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `skeletal_points` [INFO] [stdout] --> src/types.rs:198:18 [INFO] [stdout] | [INFO] [stdout] 198 | for i in 0..25 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_range_loop [INFO] [stdout] help: consider using an iterator and enumerate() [INFO] [stdout] | [INFO] [stdout] 198 - for i in 0..25 { [INFO] [stdout] 198 + for (i, ) in skeletal_points.iter_mut().enumerate() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/types.rs:200:36 [INFO] [stdout] | [INFO] [stdout] 200 | let x: f32 = raw_parts[starting_point + 0].trim().parse()?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider reducing it to: `starting_point` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] = note: `#[warn(clippy::identity_op)]` 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/types.rs:336:14 [INFO] [stdout] | [INFO] [stdout] 336 | .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: unneeded `return` statement [INFO] [stdout] --> src/types.rs:482:9 [INFO] [stdout] | [INFO] [stdout] 482 | return unsafe { pc_helper.pc }; [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] 482 - return unsafe { pc_helper.pc }; [INFO] [stdout] 482 + unsafe { pc_helper.pc } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types.rs:537:9 [INFO] [stdout] | [INFO] [stdout] 537 | return (dx.powi(2) + dy.powi(2) + dz.powi(2)).sqrt(); [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] 537 - return (dx.powi(2) + dy.powi(2) + dz.powi(2)).sqrt(); [INFO] [stdout] 537 + (dx.powi(2) + dy.powi(2) + dz.powi(2)).sqrt() [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/types.rs:540:56 [INFO] [stdout] | [INFO] [stdout] 540 | pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [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] 540 - pub async fn calculate_points_centroid(datapoints: &Vec) -> PointCloudPoint { [INFO] [stdout] 540 + pub async fn calculate_points_centroid(datapoints: &[PointCloudPoint]) -> PointCloudPoint { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: returning the result of a `let` binding from a block [INFO] [stdout] --> src/types.rs:554:9 [INFO] [stdout] | [INFO] [stdout] 547 | / let centroid = PointCloudPoint { [INFO] [stdout] 548 | | x: accum_torso_centroid.0.x / accum_torso_centroid.1, [INFO] [stdout] 549 | | y: accum_torso_centroid.0.y / accum_torso_centroid.1, [INFO] [stdout] 550 | | z: accum_torso_centroid.0.z / accum_torso_centroid.1, [INFO] [stdout] 551 | | d: accum_torso_centroid.0.d / accum_torso_centroid.1, [INFO] [stdout] 552 | | w: accum_torso_centroid.0.w, [INFO] [stdout] 553 | | }; [INFO] [stdout] | |__________- unnecessary `let` binding [INFO] [stdout] 554 | centroid [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] 547 ~ [INFO] [stdout] 548 ~ PointCloudPoint { [INFO] [stdout] 549 + x: accum_torso_centroid.0.x / accum_torso_centroid.1, [INFO] [stdout] 550 + y: accum_torso_centroid.0.y / accum_torso_centroid.1, [INFO] [stdout] 551 + z: accum_torso_centroid.0.z / accum_torso_centroid.1, [INFO] [stdout] 552 + d: accum_torso_centroid.0.d / accum_torso_centroid.1, [INFO] [stdout] 553 + w: accum_torso_centroid.0.w, [INFO] [stdout] 554 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/types.rs:724:9 [INFO] [stdout] | [INFO] [stdout] 724 | return Some(result); [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] 724 - return Some(result); [INFO] [stdout] 724 + Some(result) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:750:9 [INFO] [stdout] | [INFO] [stdout] 750 | /// the data from which a TLV header should [INFO] [stdout] | ^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:751:9 [INFO] [stdout] | [INFO] [stdout] 751 | /// be extracted [INFO] [stdout] | ^^^^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:755:9 [INFO] [stdout] | [INFO] [stdout] 755 | /// from the input, the input is unchanged [INFO] [stdout] | ^^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:757:9 [INFO] [stdout] | [INFO] [stdout] 757 | /// and removed the 8 bytes from which it was extracted [INFO] [stdout] | ^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item overindented [INFO] [stdout] --> src/types.rs:758:9 [INFO] [stdout] | [INFO] [stdout] 758 | /// from the input. [INFO] [stdout] | ^^^^^^^^ help: try using ` ` (2 spaces) [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_overindented_list_items [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/main.rs:76:64 [INFO] [stdout] | [INFO] [stdout] 76 | let settings: Arc = Arc::new(Settings::from_file(&settings_path)); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: change this to: `settings_path` [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:114:59 [INFO] [stdout] | [INFO] [stdout] 114 | let config: Config = get_result(Config::from_file(&config_path)); [INFO] [stdout] | ^^^^^^^^^^^^ help: change this to: `config_path` [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: `to_string` applied to a type that implements `Display` in `eprintln!` args [INFO] [stdout] --> src/main.rs:192:30 [INFO] [stdout] | [INFO] [stdout] 192 | eprintln!("{}", e.to_string()); [INFO] [stdout] | ^^^^^^^^^^^^ help: remove this [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#to_string_in_format_args [INFO] [stdout] = note: `#[warn(clippy::to_string_in_format_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 41.23s [INFO] running `Command { std: "docker" "inspect" "4ae24e5d420d85d568b42f43c53e14d76f1617f951488d1d48d25dadf1c525f0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4ae24e5d420d85d568b42f43c53e14d76f1617f951488d1d48d25dadf1c525f0", kill_on_drop: false }` [INFO] [stdout] 4ae24e5d420d85d568b42f43c53e14d76f1617f951488d1d48d25dadf1c525f0