[INFO] cloning repository https://github.com/Xiaobaishushu25/RLeetCode [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Xiaobaishushu25/RLeetCode" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaobaishushu25%2FRLeetCode", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaobaishushu25%2FRLeetCode'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 7420cc2d4bce5a0fc676f11161b0f59f3fbbc06f [INFO] linting Xiaobaishushu25/RLeetCode against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FXiaobaishushu25%2FRLeetCode" "/workspace/builds/worker-5-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-5-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Xiaobaishushu25/RLeetCode [INFO] finished tweaking git repo https://github.com/Xiaobaishushu25/RLeetCode [INFO] tweaked toml for git repo https://github.com/Xiaobaishushu25/RLeetCode written to /workspace/builds/worker-5-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Xiaobaishushu25/RLeetCode 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/Xiaobaishushu25/RLeetCode 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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b63b93a56928698288f79e1005bd77c7fd9a8436e9ff4c4fd106cd69f11c7401 [INFO] running `Command { std: "docker" "start" "-a" "b63b93a56928698288f79e1005bd77c7fd9a8436e9ff4c4fd106cd69f11c7401", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b63b93a56928698288f79e1005bd77c7fd9a8436e9ff4c4fd106cd69f11c7401", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b63b93a56928698288f79e1005bd77c7fd9a8436e9ff4c4fd106cd69f11c7401", kill_on_drop: false }` [INFO] [stdout] b63b93a56928698288f79e1005bd77c7fd9a8436e9ff4c4fd106cd69f11c7401 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-5-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2b5ca856a6d6e465ee6dff12f67e394a6c4c883b666538bb0cadfce15f2cd6da [INFO] running `Command { std: "docker" "start" "-a" "2b5ca856a6d6e465ee6dff12f67e394a6c4c883b666538bb0cadfce15f2cd6da", kill_on_drop: false }` [INFO] [stderr] Checking RLeetCode v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/product_of_array_except_self.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | ///
  • 2 <= nums.length <= 105
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] = note: `#[warn(clippy::tabs_in_doc_comments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/product_of_array_except_self.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | ///
  • -30 <= nums[i] <= 30
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/product_of_array_except_self.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | ///
  • 保证 数组 nums之中任意元素的全部前缀元素和后缀的乘积都在  32 位... [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/merge_intervals.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | ///
  • 1 <= intervals.length <= 104
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/merge_intervals.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | ///
  • intervals[i].length == 2
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/merge_intervals.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | ///
  • 0 <= starti <= endi <= 104
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_array.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | ///
  • 1 <= nums.length <= 105
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_array.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | ///
  • -231 <= nums[i] <= 231 - 1
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_array.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | ///
  • 0 <= k <= 105
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_array.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | ///
  • 尽可能想出更多的解决方案,至少有 三种 不同的方法可以解决这个问题。
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_array.rs:45:4 [INFO] [stdout] | [INFO] [stdout] 45 | ///
  • 你可以使用空间复杂度为 O(1) 的 原地 算法解决这个问题吗?
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | ///
  • m == matrix.length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | ///
  • n == matrix[0].length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | ///
  • 1 <= m, n <= 200
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | ///
  • -231 <= matrix[i][j] <= 231 - 1
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:42:4 [INFO] [stdout] | [INFO] [stdout] 42 | ///
  • 一个直观的解决方案是使用  O(mn) 的额外空间,但这并不是一个好的解决方案。
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:43:4 [INFO] [stdout] | [INFO] [stdout] 43 | ///
  • 一个简单的改进方案是使用 O(m + n) 的额外空间,但这仍然不是最好的解决方案。
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:44:4 [INFO] [stdout] | [INFO] [stdout] 44 | ///
  • 你能想出一个仅使用常量空间的解决方案吗?
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/spiral_matrix.rs:28:4 [INFO] [stdout] | [INFO] [stdout] 28 | ///
  • m == matrix.length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/spiral_matrix.rs:29:4 [INFO] [stdout] | [INFO] [stdout] 29 | ///
  • n == matrix[i].length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/spiral_matrix.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | ///
  • 1 <= m, n <= 10
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/spiral_matrix.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | ///
  • -100 <= matrix[i][j] <= 100
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_image.rs:30:4 [INFO] [stdout] | [INFO] [stdout] 30 | ///
  • n == matrix.length == matrix[i].length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_image.rs:31:4 [INFO] [stdout] | [INFO] [stdout] 31 | ///
  • 1 <= n <= 20
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/rotate_image.rs:32:4 [INFO] [stdout] | [INFO] [stdout] 32 | ///
  • -1000 <= matrix[i][j] <= 1000
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:8:4 [INFO] [stdout] | [INFO] [stdout] 8 | ///
  • 每行的元素从左到右升序排列。
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:9:4 [INFO] [stdout] | [INFO] [stdout] 9 | ///
  • 每列的元素从上到下升序排列。
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:33:4 [INFO] [stdout] | [INFO] [stdout] 33 | ///
  • m == matrix.length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:34:4 [INFO] [stdout] | [INFO] [stdout] 34 | ///
  • n == matrix[i].length
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:35:4 [INFO] [stdout] | [INFO] [stdout] 35 | ///
  • 1 <= n, m <= 300
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | ///
  • -109 <= matrix[i][j] <= 109
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | ///
  • 每行的所有元素从左到右升序排列
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:38:4 [INFO] [stdout] | [INFO] [stdout] 38 | ///
  • 每列的所有元素从上到下升序排列
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:39:4 [INFO] [stdout] | [INFO] [stdout] 39 | ///
  • -109 <= target <= 109
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `>= y + 1` or `x - 1 >=` [INFO] [stdout] --> src/hard/minimum_window_substring.rs:78:32 [INFO] [stdout] | [INFO] [stdout] 78 | ... if *i-1>=*need_i { [INFO] [stdout] | ^^^^^^^^^^^^^ help: change it to: `*i > *need_i` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#int_plus_one [INFO] [stdout] = note: `#[warn(clippy::int_plus_one)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/hard/first_missing_positive.rs:36:4 [INFO] [stdout] | [INFO] [stdout] 36 | ///
  • 1 <= nums.length <= 5 * 105
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: using tabs in doc comments is not recommended [INFO] [stdout] --> src/hard/first_missing_positive.rs:37:4 [INFO] [stdout] | [INFO] [stdout] 37 | ///
  • -231 <= nums[i] <= 231 - 1
  • [INFO] [stdout] | ^^^^ help: consider using four spaces per tab [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#tabs_in_doc_comments [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/easy/valid_parentheses.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | chars.len()==0 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `chars.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/easy/valid_parentheses.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return true [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] 98 - return true [INFO] [stdout] 98 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/easy/valid_parentheses.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | right = right-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `right -= 1` [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/easy/valid_parentheses.rs:79:21 [INFO] [stdout] | [INFO] [stdout] 79 | right = right-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `right -= 1` [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/easy/valid_parentheses.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | right = right-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `right -= 1` [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: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/middle/max_area.rs:42:51 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [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] 42 - pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [INFO] [stdout] 42 + pub fn compute_area(left:usize,right:usize,height:&[i32]) -> i32{ [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/hard/trapping_rain_water.rs:101:51 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [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] 101 - pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [INFO] [stdout] 101 + pub fn compute_area(left:usize,right:usize,height:&[i32]) -> i32{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/easy/valid_parentheses.rs:59:5 [INFO] [stdout] | [INFO] [stdout] 59 | chars.len()==0 [INFO] [stdout] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `chars.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/easy/valid_parentheses.rs:98:5 [INFO] [stdout] | [INFO] [stdout] 98 | return true [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] 98 - return true [INFO] [stdout] 98 + true [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of an assign operation [INFO] [stdout] --> src/easy/valid_parentheses.rs:73:21 [INFO] [stdout] | [INFO] [stdout] 73 | right = right-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `right -= 1` [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/easy/valid_parentheses.rs:79:21 [INFO] [stdout] | [INFO] [stdout] 79 | right = right-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `right -= 1` [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/easy/valid_parentheses.rs:86:21 [INFO] [stdout] | [INFO] [stdout] 86 | right = right-1; [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: replace it with: `right -= 1` [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/middle/max_area.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | ///给定一个长度为 n 的整数数组 height 。有 n 条垂线,第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。 [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] 3 | /// 给定一个长度为 n 的整数数组 height 。有 n 条垂线,第 i 条线的两个端点是 (i, 0) 和 (i, height[i]) 。 [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/max_area.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | /// 找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 [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] 4 | /// 找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/max_area.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | /// 返回容器可以储存的最大水量。 [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] 5 | /// 返回容器可以储存的最大水量。 [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/max_area.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | /// https://leetcode.cn/problems/container-with-most-water/description/?envType=study-plan-v2&envId=top-100-liked [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] 6 | /// https://leetcode.cn/problems/container-with-most-water/description/?envType=study-plan-v2&envId=top-100-liked [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/middle/max_area.rs:42:51 [INFO] [stdout] | [INFO] [stdout] 42 | pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [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] 42 - pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [INFO] [stdout] 42 + pub fn compute_area(left:usize,right:usize,height:&[i32]) -> i32{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/find_all_anagrams.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | /// 给定两个字符串 s 和 p,找到 s 中所有 p 的 异位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。 [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] 4 | /// 给定两个字符串 s 和 p,找到 s 中所有 p 的 异位词 的子串,返回这些子串的起始索引。不考虑答案输出的顺序。 [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/subarray_sum_equals_k.rs:3:4 [INFO] [stdout] | [INFO] [stdout] 3 | /// 给你一个整数数组 nums 和一个整数 k ,请你统计并返回 该数组中和为 k 的连续子数组的个数 。 [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] 3 | /// 给你一个整数数组 nums 和一个整数 k ,请你统计并返回 该数组中和为 k 的连续子数组的个数 。 [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/subarray_sum_equals_k.rs:4:4 [INFO] [stdout] | [INFO] [stdout] 4 | /// 子数组是数组中元素的连续非空序列。 [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] 4 | /// 子数组是数组中元素的连续非空序列。 [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/subarray_sum_equals_k.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | /// 输入:nums = [1,1,1], k = 2 [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] 5 | /// 输入:nums = [1,1,1], k = 2 [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/subarray_sum_equals_k.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | /// 输出:2 [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] 6 | /// 输出:2 [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/middle/subarray_sum_equals_k.rs:7:4 [INFO] [stdout] | [INFO] [stdout] 7 | /// https://leetcode.cn/problems/subarray-sum-equals-k/description/?envType=study-plan-v2&envId=top-100-liked [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] 7 | /// https://leetcode.cn/problems/subarray-sum-equals-k/description/?envType=study-plan-v2&envId=top-100-liked [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `record` [INFO] [stdout] --> src/middle/merge_intervals.rs:74:18 [INFO] [stdout] | [INFO] [stdout] 74 | for i in 0..record.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] 74 - for i in 0..record.len(){ [INFO] [stdout] 74 + for (i, ) in record.iter().enumerate(){ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/middle/merge_intervals.rs:107:33 [INFO] [stdout] | [INFO] [stdout] 107 | if deque.is_empty() { [INFO] [stdout] | _________________________________^ [INFO] [stdout] 108 | | deque.push_back(interval); [INFO] [stdout] 109 | | }else if deque.back().unwrap()[1] src/middle/merge_intervals.rs:109:59 [INFO] [stdout] | [INFO] [stdout] 109 | }else if deque.back().unwrap()[1]interval[1]{ [INFO] [stdout] | |_____________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to pop elements from a `Vec` in a loop [INFO] [stdout] --> src/middle/merge_intervals.rs:125:37 [INFO] [stdout] | [INFO] [stdout] 125 | deque.push_back(result.pop().unwrap()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_while_let_some [INFO] [stdout] = note: `#[warn(clippy::manual_while_let_some)]` on by default [INFO] [stdout] help: consider using a `while..let` loop [INFO] [stdout] | [INFO] [stdout] 124 ~ while let Some(element) = result.pop() { [INFO] [stdout] 125 ~ deque.push_back(element); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/middle/merge_intervals.rs:137:12 [INFO] [stdout] | [INFO] [stdout] 137 | if !(intervals[1][0] <= intervals[0][1]) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(intervals[1][0] > intervals[0][1])` [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 let-binding has unit value [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:55:9 [INFO] [stdout] | [INFO] [stdout] 55 | let _ = set_zeroes(&mut vec1); [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] 55 - let _ = set_zeroes(&mut vec1); [INFO] [stdout] 55 + set_zeroes(&mut vec1); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&mut Vec` instead of `&mut [_]` involves a new object where a slice will do [INFO] [stdout] --> src/middle/set_matrix_zeroes.rs:60:31 [INFO] [stdout] | [INFO] [stdout] 60 | pub fn set_zeroes(matrix: &mut 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] 60 - pub fn set_zeroes(matrix: &mut Vec>) { [INFO] [stdout] 60 + pub fn set_zeroes(matrix: &mut [Vec]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/middle/spiral_matrix.rs:85:46 [INFO] [stdout] | [INFO] [stdout] 85 | result.extend_from_slice(&*bottom); [INFO] [stdout] | ^^^^^^^^ help: try: `&bottom` [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: this expression borrows a value the compiler would automatically borrow [INFO] [stdout] --> src/middle/rotate_image.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | temp = (&matrix[n][n..(len-n)]).to_vec(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `matrix[n][n..(len-n)]` [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: the loop variable `l` is only used to index `matrix` [INFO] [stdout] --> src/middle/search_a_2d_matrix_ii.rs:65:42 [INFO] [stdout] | [INFO] [stdout] 65 | ... for l in i+1..matrix.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] help: consider using an iterator [INFO] [stdout] | [INFO] [stdout] 65 - for l in i+1..matrix.len() { [INFO] [stdout] 65 + for in matrix.iter().skip(i+1) { [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/hard/trapping_rain_water.rs:101:51 [INFO] [stdout] | [INFO] [stdout] 101 | pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [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] 101 - pub fn compute_area(left:usize,right:usize,height:&Vec) -> i32{ [INFO] [stdout] 101 + pub fn compute_area(left:usize,right:usize,height:&[i32]) -> i32{ [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: doc list item without indentation [INFO] [stdout] --> src/hard/minimum_window_substring.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | /// 给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串, [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] 2 | /// 给你一个字符串 s 、一个字符串 t 。返回 s 中涵盖 t 所有字符的最小子串。如果 s 中不存在涵盖 t 所有字符的子串, [INFO] [stdout] | ++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: length comparison to zero [INFO] [stdout] --> src/hard/minimum_window_substring.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | if need_map.len()!=0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!need_map.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/hard/minimum_window_substring.rs:87:44 [INFO] [stdout] | [INFO] [stdout] 87 | if min_size >(right-left)&&need_map.len()==0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `need_map.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: needless call to `as_bytes` [INFO] [stdout] --> src/hard/minimum_window_substring.rs:101:47 [INFO] [stdout] | [INFO] [stdout] 101 | let mut lack = HashMap::with_capacity(t.as_bytes().len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: `len()` can be called directly on strings: `t.len()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_as_bytes [INFO] [stdout] = note: `#[warn(clippy::needless_as_bytes)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.59s [INFO] running `Command { std: "docker" "inspect" "2b5ca856a6d6e465ee6dff12f67e394a6c4c883b666538bb0cadfce15f2cd6da", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2b5ca856a6d6e465ee6dff12f67e394a6c4c883b666538bb0cadfce15f2cd6da", kill_on_drop: false }` [INFO] [stdout] 2b5ca856a6d6e465ee6dff12f67e394a6c4c883b666538bb0cadfce15f2cd6da