[INFO] cloning repository https://github.com/SimonHallefelt/connect-4 [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/SimonHallefelt/connect-4" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSimonHallefelt%2Fconnect-4", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSimonHallefelt%2Fconnect-4'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 75896ddfb2da0ea6bc6d4b674e4407bbc9a281b3 [INFO] linting SimonHallefelt/connect-4 against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSimonHallefelt%2Fconnect-4" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/SimonHallefelt/connect-4 [INFO] finished tweaking git repo https://github.com/SimonHallefelt/connect-4 [INFO] tweaked toml for git repo https://github.com/SimonHallefelt/connect-4 written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/SimonHallefelt/connect-4 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/SimonHallefelt/connect-4 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] Blocking waiting for file lock on package cache [INFO] [stderr] Updating crates.io index [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded strum v0.26.1 [INFO] [stderr] Downloaded x11-clipboard v0.9.1 [INFO] [stderr] Downloaded tiny-xlib v0.2.2 [INFO] [stderr] Downloaded ctor v0.2.6 [INFO] [stderr] Downloaded slint-build v1.4.1 [INFO] [stderr] Downloaded usvg-tree v0.38.0 [INFO] [stderr] Downloaded xdg-home v1.1.0 [INFO] [stderr] Downloaded accesskit_unix v0.7.1 [INFO] [stderr] Downloaded accesskit_winit v0.18.1 [INFO] [stderr] Downloaded vtable-macro v0.1.10 [INFO] [stderr] Downloaded accesskit_macos v0.11.0 [INFO] [stderr] Downloaded i-slint-backend-linuxkms v1.4.1 [INFO] [stderr] Downloaded enumflags2 v0.7.9 [INFO] [stderr] Downloaded svgtypes v0.13.0 [INFO] [stderr] Downloaded i-slint-backend-qt v1.4.1 [INFO] [stderr] Downloaded png v0.17.12 [INFO] [stderr] Downloaded zbus v3.15.0 [INFO] [stderr] Downloaded fontdb v0.16.1 [INFO] [stderr] Downloaded async-io v2.3.1 [INFO] [stderr] Downloaded objc2 v0.5.0 [INFO] [stderr] Downloaded polling v3.4.0 [INFO] [stderr] Downloaded skia-bindings v0.70.0 [INFO] [stderr] Downloaded syn v2.0.49 [INFO] [stderr] Downloaded rustybuzz v0.11.0 [INFO] [stderr] Downloaded femtovg v0.8.2 [INFO] [stderr] Downloaded rustybuzz v0.12.1 [INFO] [stderr] Downloaded i-slint-core v1.4.1 [INFO] [stderr] Downloaded usvg-parser v0.38.0 [INFO] [stderr] Downloaded resvg v0.38.0 [INFO] [stderr] Downloaded i-slint-compiler v1.4.1 [INFO] [stderr] Downloaded skia-safe v0.70.0 [INFO] [stderr] Downloaded i-slint-renderer-skia v1.4.1 [INFO] [stderr] Downloaded i-slint-common v1.4.1 [INFO] [stderr] Downloaded objc2-encode v4.0.0 [INFO] [stderr] Downloaded accesskit_windows v0.16.0 [INFO] [stderr] Downloaded i-slint-backend-winit v1.4.1 [INFO] [stderr] Downloaded i-slint-renderer-femtovg v1.4.1 [INFO] [stderr] Downloaded usvg-text-layout v0.38.0 [INFO] [stderr] Downloaded usvg v0.38.0 [INFO] [stderr] Downloaded event-listener v5.0.0 [INFO] [stderr] Downloaded zbus_macros v3.15.0 [INFO] [stderr] Downloaded winit v0.29.10 [INFO] [stderr] Downloaded i-slint-core-macros v1.4.1 [INFO] [stderr] Downloaded slint-macros v1.4.1 [INFO] [stderr] Downloaded by_address v1.1.0 [INFO] [stderr] Downloaded accesskit_consumer v0.17.0 [INFO] [stderr] Downloaded generational-arena v0.2.9 [INFO] [stderr] Downloaded lru v0.12.2 [INFO] [stderr] Downloaded enumflags2_derive v0.7.9 [INFO] [stderr] Downloaded cfg_aliases v0.2.0 [INFO] [stderr] Downloaded const-field-offset-macro v0.1.3 [INFO] [stderr] Downloaded const-field-offset v0.1.3 [INFO] [stderr] Downloaded lyon_extra v1.0.1 [INFO] [stderr] Downloaded ahash v0.8.8 [INFO] [stderr] Downloaded strum_macros v0.26.1 [INFO] [stderr] Downloaded i-slint-backend-selector v1.4.1 [INFO] [stderr] Downloaded vtable v0.1.11 [INFO] [stderr] Downloaded web-time v1.0.0 [INFO] [stderr] Downloaded icrate v0.1.0 [INFO] [stderr] Downloaded slint v1.4.1 [INFO] [stderr] Downloaded image v0.24.8 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 5d8511b12f328fea6c65df02577320013f33b96a04fc2aa655eadc40c7153971 [INFO] running `Command { std: "docker" "start" "-a" "5d8511b12f328fea6c65df02577320013f33b96a04fc2aa655eadc40c7153971", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "5d8511b12f328fea6c65df02577320013f33b96a04fc2aa655eadc40c7153971", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "5d8511b12f328fea6c65df02577320013f33b96a04fc2aa655eadc40c7153971", kill_on_drop: false }` [INFO] [stdout] 5d8511b12f328fea6c65df02577320013f33b96a04fc2aa655eadc40c7153971 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0eda7abc683aa5c177d21a9487e5ea9ed15fd2bdf058e2cf4fd54bbed2b980d2 [INFO] running `Command { std: "docker" "start" "-a" "0eda7abc683aa5c177d21a9487e5ea9ed15fd2bdf058e2cf4fd54bbed2b980d2", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.78 [INFO] [stderr] Compiling libc v0.2.153 [INFO] [stderr] Compiling portable-atomic v1.6.0 [INFO] [stderr] Checking critical-section v1.1.2 [INFO] [stderr] Compiling memchr v2.7.1 [INFO] [stderr] Checking bitflags v2.4.2 [INFO] [stderr] Compiling crc32fast v1.4.0 [INFO] [stderr] Compiling ahash v0.8.8 [INFO] [stderr] Checking libloading v0.8.1 [INFO] [stderr] Compiling zerocopy v0.7.32 [INFO] [stderr] Checking smallvec v1.13.1 [INFO] [stderr] Compiling num-traits v0.2.18 [INFO] [stderr] Compiling log v0.4.20 [INFO] [stderr] Compiling slotmap v1.0.7 [INFO] [stderr] Compiling rustix v0.38.31 [INFO] [stderr] Checking linux-raw-sys v0.4.13 [INFO] [stderr] Compiling crossbeam-utils v0.8.19 [INFO] [stderr] Checking dlib v0.5.2 [INFO] [stderr] Compiling wayland-sys v0.31.1 [INFO] [stderr] Checking arrayvec v0.7.4 [INFO] [stderr] Compiling regex-syntax v0.8.2 [INFO] [stderr] Checking parking v2.2.0 [INFO] [stderr] Checking ttf-parser v0.20.0 [INFO] [stderr] Compiling thiserror v1.0.57 [INFO] [stderr] Compiling semver v1.0.21 [INFO] [stderr] Checking miniz_oxide v0.7.2 [INFO] [stderr] Compiling hashbrown v0.14.3 [INFO] [stderr] Checking float-cmp v0.9.0 [INFO] [stderr] Compiling bytemuck v1.14.3 [INFO] [stderr] Checking strict-num v0.1.1 [INFO] [stderr] Compiling roxmltree v0.19.0 [INFO] [stderr] Compiling adler v1.0.2 [INFO] [stderr] Checking futures-io v0.3.30 [INFO] [stderr] Checking fdeflate v0.3.4 [INFO] [stderr] Compiling quote v1.0.35 [INFO] [stderr] Compiling cc v1.0.83 [INFO] [stderr] Compiling indexmap v2.2.3 [INFO] [stderr] Checking concurrent-queue v2.4.0 [INFO] [stderr] Checking flate2 v1.0.28 [INFO] [stderr] Compiling syn v2.0.49 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Compiling aho-corasick v1.1.2 [INFO] [stderr] Compiling quick-xml v0.31.0 [INFO] [stderr] Checking event-listener v4.0.3 [INFO] [stderr] Checking fastrand v2.0.1 [INFO] [stderr] Compiling serde v1.0.196 [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Checking event-listener-strategy v0.4.0 [INFO] [stderr] Checking event-listener v5.0.0 [INFO] [stderr] Checking png v0.17.12 [INFO] [stderr] Checking tracing-core v0.1.32 [INFO] [stderr] Compiling fontconfig-parser v0.5.6 [INFO] [stderr] Compiling memmap2 v0.9.4 [INFO] [stderr] Compiling toml_edit v0.19.15 [INFO] [stderr] Checking getrandom v0.2.12 [INFO] [stderr] Compiling rustversion v1.0.14 [INFO] [stderr] Compiling wayland-backend v0.3.3 [INFO] [stderr] Compiling wayland-scanner v0.31.1 [INFO] [stderr] Compiling io-lifetimes v1.0.11 [INFO] [stderr] Checking nix v0.26.4 [INFO] [stderr] Compiling crossbeam-epoch v0.9.18 [INFO] [stderr] Checking event-listener-strategy v0.5.0 [INFO] [stderr] Checking async-lock v3.3.0 [INFO] [stderr] Checking futures-lite v2.2.0 [INFO] [stderr] Compiling polling v2.8.0 [INFO] [stderr] Compiling regex-automata v0.4.5 [INFO] [stderr] Compiling rustix v0.37.27 [INFO] [stderr] Checking waker-fn v1.1.1 [INFO] [stderr] Checking async-task v4.7.0 [INFO] [stderr] Compiling arrayref v0.3.7 [INFO] [stderr] Checking futures-lite v1.13.0 [INFO] [stderr] Compiling tiny-skia-path v0.11.4 [INFO] [stderr] Checking piper v0.2.1 [INFO] [stderr] Compiling crossbeam-deque v0.8.5 [INFO] [stderr] Checking async-channel v2.2.0 [INFO] [stderr] Compiling fontdb v0.16.1 [INFO] [stderr] Checking async-lock v2.8.0 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Compiling kurbo v0.9.5 [INFO] [stderr] Compiling lock_api v0.4.11 [INFO] [stderr] Compiling async-fs v1.6.0 [INFO] [stderr] Compiling async-io v1.13.0 [INFO] [stderr] Compiling byteorder v1.5.0 [INFO] [stderr] Compiling siphasher v0.3.11 [INFO] [stderr] Compiling xml-rs v0.8.19 [INFO] [stderr] Checking unicode-script v0.5.5 [INFO] [stderr] Compiling async-trait v0.1.77 [INFO] [stderr] Checking linux-raw-sys v0.3.8 [INFO] [stderr] Checking unicode-ccc v0.1.2 [INFO] [stderr] Checking unicode-bidi-mirroring v0.1.0 [INFO] [stderr] Checking unicode-properties v0.1.1 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Compiling rayon-core v1.12.1 [INFO] [stderr] Compiling proc-macro-crate v1.3.1 [INFO] [stderr] Checking svgtypes v0.13.0 [INFO] [stderr] Checking socket2 v0.4.10 [INFO] [stderr] Compiling rustc_version v0.4.0 [INFO] [stderr] Compiling smithay-client-toolkit v0.18.1 [INFO] [stderr] Compiling either v1.10.0 [INFO] [stderr] Checking xcursor v0.3.5 [INFO] [stderr] Checking xkeysym v0.2.0 [INFO] [stderr] Compiling unicode-bidi v0.3.15 [INFO] [stderr] Compiling gl_generator v0.14.0 [INFO] [stderr] Compiling field-offset v0.3.6 [INFO] [stderr] Compiling usvg-tree v0.38.0 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Compiling zvariant_utils v1.0.1 [INFO] [stderr] Checking async-executor v1.8.0 [INFO] [stderr] Checking async-broadcast v0.5.1 [INFO] [stderr] Checking euclid v0.22.9 [INFO] [stderr] Checking xdg-home v1.1.0 [INFO] [stderr] Checking ordered-stream v0.2.0 [INFO] [stderr] Compiling x11-dl v2.21.0 [INFO] [stderr] Compiling regex v1.10.3 [INFO] [stderr] Compiling spin v0.9.8 [INFO] [stderr] Compiling rayon v1.8.1 [INFO] [stderr] Compiling toml_edit v0.21.1 [INFO] [stderr] Compiling cpp_common v0.5.9 [INFO] [stderr] Compiling simplecss v0.2.1 [INFO] [stderr] Compiling rustybuzz v0.12.1 [INFO] [stderr] Checking imagesize v0.12.0 [INFO] [stderr] Compiling cpp_build v0.5.9 [INFO] [stderr] Checking unicode-vo v0.1.0 [INFO] [stderr] Checking lyon_geom v1.0.5 [INFO] [stderr] Checking x11rb-protocol v0.13.0 [INFO] [stderr] Checking data-url v0.3.1 [INFO] [stderr] Checking raw-window-handle v0.5.2 [INFO] [stderr] Checking wayland-client v0.31.2 [INFO] [stderr] Checking wayland-csd-frame v0.3.0 [INFO] [stderr] Checking lyon_path v1.0.4 [INFO] [stderr] Compiling flume v0.11.0 [INFO] [stderr] Checking owned_ttf_parser v0.20.0 [INFO] [stderr] Compiling usvg-parser v0.38.0 [INFO] [stderr] Compiling unicode-normalization v0.1.22 [INFO] [stderr] Compiling half v2.3.1 [INFO] [stderr] Checking pico-args v0.5.0 [INFO] [stderr] Compiling xmlwriter v0.1.0 [INFO] [stderr] Compiling percent-encoding v2.3.1 [INFO] [stderr] Compiling derive_more v0.99.17 [INFO] [stderr] Compiling zvariant_derive v3.15.0 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Compiling zbus_macros v3.15.0 [INFO] [stderr] Compiling idna v0.5.0 [INFO] [stderr] Compiling form_urlencoded v1.2.1 [INFO] [stderr] Compiling gif v0.12.0 [INFO] [stderr] Checking wayland-protocols v0.31.2 [INFO] [stderr] Compiling bytemuck_derive v1.5.0 [INFO] [stderr] Compiling tracing-attributes v0.1.27 [INFO] [stderr] Compiling thiserror-impl v1.0.57 [INFO] [stderr] Compiling serde_derive v1.0.196 [INFO] [stderr] Compiling strum_macros v0.26.1 [INFO] [stderr] Compiling enumflags2_derive v0.7.9 [INFO] [stderr] Compiling futures-macro v0.3.30 [INFO] [stderr] Compiling async-recursion v1.0.5 [INFO] [stderr] Checking futures-util v0.3.30 [INFO] [stderr] Compiling serde_repr v0.1.18 [INFO] [stderr] Checking wayland-cursor v0.31.1 [INFO] [stderr] Checking tracing v0.1.40 [INFO] [stderr] Compiling usvg-text-layout v0.38.0 [INFO] [stderr] Checking tiny-skia v0.11.4 [INFO] [stderr] Checking rgb v0.8.37 [INFO] [stderr] Checking polling v3.4.0 [INFO] [stderr] Checking blocking v1.5.1 [INFO] [stderr] Compiling jpeg-decoder v0.3.1 [INFO] [stderr] Compiling i-slint-common v1.4.1 [INFO] [stderr] Checking calloop v0.12.4 [INFO] [stderr] Compiling proc-macro-crate v3.1.0 [INFO] [stderr] Compiling const-field-offset-macro v0.1.3 [INFO] [stderr] Compiling usvg v0.38.0 [INFO] [stderr] Compiling num_enum_derive v0.7.2 [INFO] [stderr] Checking image v0.24.8 [INFO] [stderr] Checking calloop-wayland-source v0.2.0 [INFO] [stderr] Checking const-field-offset v0.1.3 [INFO] [stderr] Compiling qttypes v0.2.11 [INFO] [stderr] Compiling pin-project-internal v1.1.4 [INFO] [stderr] Compiling tiff v0.9.1 [INFO] [stderr] Compiling vtable-macro v0.1.10 [INFO] [stderr] Compiling exr v1.72.0 [INFO] [stderr] Checking ab_glyph v0.2.23 [INFO] [stderr] Compiling derive_utils v0.14.1 [INFO] [stderr] Compiling glutin_glx_sys v0.5.0 [INFO] [stderr] Compiling glutin_egl_sys v0.6.0 [INFO] [stderr] Compiling winit v0.29.10 [INFO] [stderr] Compiling qoi v0.4.1 [INFO] [stderr] Compiling memoffset v0.9.0 [INFO] [stderr] Checking unicode-segmentation v1.11.0 [INFO] [stderr] Compiling countme v3.0.1 [INFO] [stderr] Compiling linked-hash-map v0.5.6 [INFO] [stderr] Compiling codemap v0.1.3 [INFO] [stderr] Compiling text-size v1.1.1 [INFO] [stderr] Compiling i-slint-compiler v1.4.1 [INFO] [stderr] Compiling rowan v0.15.15 [INFO] [stderr] Compiling codemap-diagnostic v0.1.2 [INFO] [stderr] Checking vtable v0.1.11 [INFO] [stderr] Compiling linked_hash_set v0.1.4 [INFO] [stderr] Compiling auto_enums v0.8.5 [INFO] [stderr] Compiling num_enum v0.7.2 [INFO] [stderr] Checking strum v0.26.1 [INFO] [stderr] Checking pin-project v1.1.4 [INFO] [stderr] Checking fontdue v0.8.0 [INFO] [stderr] Compiling i-slint-core-macros v1.4.1 [INFO] [stderr] Compiling url v2.5.0 [INFO] [stderr] Compiling lyon_extra v1.0.1 [INFO] [stderr] Checking lyon_algorithms v1.0.4 [INFO] [stderr] Checking wayland-protocols-wlr v0.2.0 [INFO] [stderr] Checking resvg v0.38.0 [INFO] [stderr] Checking wayland-protocols-plasma v0.2.0 [INFO] [stderr] Checking xkbcommon-dl v0.4.2 [INFO] [stderr] Compiling itertools v0.12.1 [INFO] [stderr] Checking integer-sqrt v0.1.5 [INFO] [stderr] Compiling glutin v0.31.3 [INFO] [stderr] Compiling css-color-parser2 v1.0.1 [INFO] [stderr] Checking pin-weak v1.1.0 [INFO] [stderr] Compiling smol_str v0.2.1 [INFO] [stderr] Checking accesskit v0.12.2 [INFO] [stderr] Compiling by_address v1.1.0 [INFO] [stderr] Checking unicode-linebreak v0.1.5 [INFO] [stderr] Compiling x11rb v0.12.0 [INFO] [stderr] Checking scoped-tls-hkt v0.1.4 [INFO] [stderr] Checking raw-window-handle v0.6.0 [INFO] [stderr] Checking clru v0.6.1 [INFO] [stderr] Compiling spin_on v0.1.1 [INFO] [stderr] Checking accesskit_consumer v0.17.0 [INFO] [stderr] Checking rustybuzz v0.11.0 [INFO] [stderr] Compiling ctor v0.2.6 [INFO] [stderr] Compiling i-slint-backend-qt v1.4.1 [INFO] [stderr] Compiling cpp_macros v0.5.9 [INFO] [stderr] Checking x11rb-protocol v0.12.0 [INFO] [stderr] Checking gethostname v0.3.0 [INFO] [stderr] Compiling softbuffer v0.3.4 [INFO] [stderr] Compiling glutin-winit v0.4.2 [INFO] [stderr] Checking libloading v0.7.4 [INFO] [stderr] Checking generational-arena v0.2.9 [INFO] [stderr] Checking lru v0.12.2 [INFO] [stderr] Checking glow v0.13.1 [INFO] [stderr] Compiling cfg_aliases v0.2.0 [INFO] [stderr] Checking imgref v1.10.1 [INFO] [stderr] Checking i-slint-core v1.4.1 [INFO] [stderr] Compiling i-slint-backend-winit v1.4.1 [INFO] [stderr] Checking tiny-xlib v0.2.2 [INFO] [stderr] Checking cpp v0.5.9 [INFO] [stderr] Compiling i-slint-backend-selector v1.4.1 [INFO] [stderr] Checking sctk-adwaita v0.8.1 [INFO] [stderr] Checking smithay-clipboard v0.7.0 [INFO] [stderr] Checking enumflags2 v0.7.9 [INFO] [stderr] Checking zvariant v3.15.0 [INFO] [stderr] Checking femtovg v0.8.2 [INFO] [stderr] Checking i-slint-renderer-femtovg v1.4.1 [INFO] [stderr] Checking zbus_names v2.6.0 [INFO] [stderr] Checking zbus v3.15.0 [INFO] [stderr] Checking x11rb v0.13.0 [INFO] [stderr] Checking x11-clipboard v0.9.1 [INFO] [stderr] Checking copypasta v0.10.1 [INFO] [stderr] Checking atspi-common v0.3.0 [INFO] [stderr] Checking atspi-proxies v0.3.0 [INFO] [stderr] Compiling slint-build v1.4.1 [INFO] [stderr] Checking atspi-connection v0.3.0 [INFO] [stderr] Checking atspi v0.19.0 [INFO] [stderr] Checking accesskit_unix v0.7.1 [INFO] [stderr] Compiling connect-4 v1.0.0 (/opt/rustwide/workdir) [INFO] [stderr] Compiling slint-macros v1.4.1 [INFO] [stderr] Checking accesskit_winit v0.18.1 [INFO] [stderr] Checking slint v1.4.1 [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 8 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerButton_root_16 { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 9 | ...ot_16 : sp :: r#Empty , r#native_18 : sp :: r#NativeButton , r#root_16_empty_17_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_16_empty_17_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_16_empty_17_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_16_height : sp :: Property < sp :: LogicalLength > , r#root_16_native_18_y : sp :: Property < sp :: LogicalLength > , r#root_16_width : sp :: Property < sp :: LogicalLength > , r#root_16_x : sp :: Property < sp :: LogicalLength > , r#root_16_y : sp :: Property < sp :: LogicalLength > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerButton_root_16 >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 9 - r#root_16 : sp :: r#Empty , r#native_18 : sp :: r#NativeButton , r#root_16_empty_17_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_16_empty_17_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_16_empty_17_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_16_height : sp :: Property < sp :: LogicalLength > , r#root_16_native_18_y : sp :: Property < sp :: LogicalLength > , r#root_16_width : sp :: Property < sp :: LogicalLength > , r#root_16_x : sp :: Property < sp :: LogicalLength > , r#root_16_y : sp :: Property < sp :: LogicalLength > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerButton_root_16 >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] 9 + r#root_16 : () , r#native_18 : () , r#root_16_empty_17_layout_cache : () , r#root_16_empty_17_layoutinfo_h : () , r#root_16_empty_17_layoutinfo_v : () , r#root_16_height : () , r#root_16_native_18_y : () , r#root_16_width : () , r#root_16_x : () , r#root_16_y : () , self_weak : () , root : () , tree_index : () , tree_index_of_first_child : () , } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:210:21 [INFO] [stdout] | [INFO] [stdout] 209 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] pub struct InnerAppWindow { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 210 | ...ot_1 : sp :: r#WindowItem , r#text_3 : sp :: r#Text , r#empty_4 : sp :: r#Empty , r#text_10 : sp :: r#Text , r#rectangle_11 : sp :: r#Empty , r#button_5 : InnerButton_root_16 , r#button_6 : InnerButton_root_16 , r#button_7 : InnerButton_root_16 , r#button_8 : InnerButton_root_16 , r#button_9 : InnerButton_root_16 , r#button_15 : InnerButton_root_16 , r#root_1_board : sp :: Property < sp :: ModelRc < sp :: ModelRc < i32 > > > , r#root_1_empty_2_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_2_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_2_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_4_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_width : sp :: Property < sp :: LogicalLength > , r#root_1_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_pieces : sp :: Property < sp :: ModelRc < r#pieceData > > , r#root_1_player : sp :: Property < i32 > , r#root_1_player_1_type : sp :: Property < i32 > , r#root_1_player_2_type : sp :: Property < i32 > , r#root_1_player_type : sp :: Property < i32 > , r#root_1_won_massage : sp :: Property < sp :: SharedString > , r#root_1_x : sp :: Property < sp :: LogicalLength > , r#root_1_y : sp :: Property < sp :: LogicalLength > , r#root_1_clicked_board_box : sp :: Callback < (i32 ,) , () > , r#root_1_request_run_game : sp :: Callback < () , () > , r#root_1_set_player_type : sp :: Callback < () , () > , repeater0 : sp :: Repeater < InnerComponent_rectangle_12 > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerAppWindow >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , globals : Globals_AppWindow , window_adapter_ : sp :: OnceCell < sp :: WindowAdapterRc > , } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 210 - r#root_1 : sp :: r#WindowItem , r#text_3 : sp :: r#Text , r#empty_4 : sp :: r#Empty , r#text_10 : sp :: r#Text , r#rectangle_11 : sp :: r#Empty , r#button_5 : InnerButton_root_16 , r#button_6 : InnerButton_root_16 , r#button_7 : InnerButton_root_16 , r#button_8 : InnerButton_root_16 , r#button_9 : InnerButton_root_16 , r#button_15 : InnerButton_root_16 , r#root_1_board : sp :: Property < sp :: ModelRc < sp :: ModelRc < i32 > > > , r#root_1_empty_2_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_2_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_2_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_4_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_width : sp :: Property < sp :: LogicalLength > , r#root_1_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_pieces : sp :: Property < sp :: ModelRc < r#pieceData > > , r#root_1_player : sp :: Property < i32 > , r#root_1_player_1_type : sp :: Property < i32 > , r#root_1_player_2_type : sp :: Property < i32 > , r#root_1_player_type : sp :: Property < i32 > , r#root_1_won_massage : sp :: Property < sp :: SharedString > , r#root_1_x : sp :: Property < sp :: LogicalLength > , r#root_1_y : sp :: Property < sp :: LogicalLength > , r#root_1_clicked_board_box : sp :: Callback < (i32 ,) , () > , r#root_1_request_run_game : sp :: Callback < () , () > , r#root_1_set_player_type : sp :: Callback < () , () > , repeater0 : sp :: Repeater < InnerComponent_rectangle_12 > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerAppWindow >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , globals : Globals_AppWindow , window_adapter_ : sp :: OnceCell < sp :: WindowAdapterRc > , } [INFO] [stdout] 210 + r#root_1 : () , r#text_3 : () , r#empty_4 : () , r#text_10 : () , r#rectangle_11 : () , r#button_5 : () , r#button_6 : () , r#button_7 : () , r#button_8 : () , r#button_9 : () , r#button_15 : () , r#root_1_board : () , r#root_1_empty_2_layout_cache : () , r#root_1_empty_2_layoutinfo_h : () , r#root_1_empty_2_layoutinfo_v : () , r#root_1_empty_4_layout_cache : () , r#root_1_empty_4_layoutinfo_h : () , r#root_1_empty_4_layoutinfo_v : () , r#root_1_empty_4_width : () , r#root_1_layoutinfo_h : () , r#root_1_layoutinfo_v : () , r#root_1_pieces : () , r#root_1_player : () , r#root_1_player_1_type : () , r#root_1_player_2_type : () , r#root_1_player_type : () , r#root_1_won_massage : () , r#root_1_x : () , r#root_1_y : () , r#root_1_clicked_board_box : () , r#root_1_request_run_game : () , r#root_1_set_player_type : () , repeater0 : () , self_weak : () , root : () , tree_index : () , tree_index_of_first_child : () , globals : () , window_adapter_ : () , } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:1873:27 [INFO] [stdout] | [INFO] [stdout] 1872 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] struct InnerComponent_rectangle_12 { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 1873 | ...ctangle_12 : sp :: r#Rectangle , r#toucharea_13 : sp :: r#TouchArea , r#model_data : sp :: Property < r#pieceData > , r#model_index : sp :: Property < i32 > , r#rectangle_12_player_piece : sp :: Property < i32 > , r#rectangle_12_toucharea_13_x : sp :: Property < sp :: LogicalLength > , r#rectangle_12_toucharea_13_y : sp :: Property < sp :: LogicalLength > , r#rectangle_12_clicked : sp :: Callback < () , () > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerComponent_rectangle_12 >> , parent : sp :: VWeakMapped :: < sp :: ItemTreeVTable , InnerAppWindow > , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 1873 - r#rectangle_12 : sp :: r#Rectangle , r#toucharea_13 : sp :: r#TouchArea , r#model_data : sp :: Property < r#pieceData > , r#model_index : sp :: Property < i32 > , r#rectangle_12_player_piece : sp :: Property < i32 > , r#rectangle_12_toucharea_13_x : sp :: Property < sp :: LogicalLength > , r#rectangle_12_toucharea_13_y : sp :: Property < sp :: LogicalLength > , r#rectangle_12_clicked : sp :: Callback < () , () > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerComponent_rectangle_12 >> , parent : sp :: VWeakMapped :: < sp :: ItemTreeVTable , InnerAppWindow > , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] 1873 + r#rectangle_12 : () , r#toucharea_13 : () , r#model_data : () , r#model_index : () , r#rectangle_12_player_piece : () , r#rectangle_12_toucharea_13_x : () , r#rectangle_12_toucharea_13_y : () , r#rectangle_12_clicked : () , self_weak : () , parent : () , root : () , tree_index : () , tree_index_of_first_child : () , } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/board.rs:26:48 [INFO] [stdout] | [INFO] [stdout] 26 | println!("The winning player is '{}'", player * -1); [INFO] [stdout] | ^^^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/board.rs:28:16 [INFO] [stdout] | [INFO] [stdout] 28 | return player * -1 * 2; [INFO] [stdout] | ^^^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/board.rs:47:22 [INFO] [stdout] | [INFO] [stdout] 47 | fn legal_move(board: &Vec>, m: i8) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 - fn legal_move(board: &Vec>, m: i8) -> bool { [INFO] [stdout] 47 + fn legal_move(board: &[Vec], m: i8) -> bool { [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/board.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | fn movee(board: &mut Vec>, m: i8, player: i8) -> usize { [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] 57 - fn movee(board: &mut Vec>, m: i8, player: i8) -> usize { [INFO] [stdout] 57 + fn movee(board: &mut [Vec], m: i8, player: i8) -> usize { [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/board.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | fn find_win(board: &Vec>) -> 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] 68 - fn find_win(board: &Vec>) -> bool { [INFO] [stdout] 68 + fn find_win(board: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/board.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | for j in 0..7 { [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 [INFO] [stdout] | [INFO] [stdout] 70 - for j in 0..7 { [INFO] [stdout] 70 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | / if board[i][j] != 0 { [INFO] [stdout] 72 | | if board[i][j] == board[i-1][j] && board[i][j] == board[i-2][j] && board[i][j] == board[i-3][j] { [INFO] [stdout] 73 | | return true; [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [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] 71 ~ if board[i][j] != 0 [INFO] [stdout] 72 ~ && board[i][j] == board[i-1][j] && board[i][j] == board[i-2][j] && board[i][j] == board[i-3][j] { [INFO] [stdout] 73 | return true; [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/board.rs:78:14 [INFO] [stdout] | [INFO] [stdout] 78 | for i in 0..6 { [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] 78 - for i in 0..6 { [INFO] [stdout] 78 + for in board.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | / if board[i][j] != 0 { [INFO] [stdout] 81 | | if board[i][j] == board[i][j+1] && board[i][j] == board[i][j+2] && board[i][j] == board[i][j+3] { [INFO] [stdout] 82 | | return true; [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ if board[i][j] != 0 [INFO] [stdout] 81 ~ && board[i][j] == board[i][j+1] && board[i][j] == board[i][j+2] && board[i][j] == board[i][j+3] { [INFO] [stdout] 82 | return true; [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / if board[i][j] != 0 { [INFO] [stdout] 90 | | if board[i][j] == board[i-1][j+1] && board[i][j] == board[i-2][j+2] && board[i][j] == board[i-3][j+3] { [INFO] [stdout] 91 | | return true; [INFO] [stdout] 92 | | } [INFO] [stdout] 93 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 89 ~ if board[i][j] != 0 [INFO] [stdout] 90 ~ && board[i][j] == board[i-1][j+1] && board[i][j] == board[i-2][j+2] && board[i][j] == board[i-3][j+3] { [INFO] [stdout] 91 | return true; [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | / if board[i][j] != 0 { [INFO] [stdout] 99 | | if board[i][j] == board[i+1][j+1] && board[i][j] == board[i+2][j+2] && board[i][j] == board[i+3][j+3] { [INFO] [stdout] 100 | | return true; [INFO] [stdout] 101 | | } [INFO] [stdout] 102 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if board[i][j] != 0 [INFO] [stdout] 99 ~ && board[i][j] == board[i+1][j+1] && board[i][j] == board[i+2][j+2] && board[i][j] == board[i+3][j+3] { [INFO] [stdout] 100 | return true; [INFO] [stdout] 101 ~ } [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/board.rs:109:21 [INFO] [stdout] | [INFO] [stdout] 109 | fn find_draw(board: &Vec>) -> 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] 109 - fn find_draw(board: &Vec>) -> bool { [INFO] [stdout] 109 + fn find_draw(board: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/board.rs:110:14 [INFO] [stdout] | [INFO] [stdout] 110 | for i in 0..7 { [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] 110 - for i in 0..7 { [INFO] [stdout] 110 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/human_player.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | return m.parse::().unwrap(); [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] 15 - return m.parse::().unwrap(); [INFO] [stdout] 15 + m.parse::().unwrap() [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/player/human_player.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | fn get_legal_moves(board: &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] 19 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 19 + fn get_legal_moves(board: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/random_player.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | return *m.unwrap(); [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] 7 - return *m.unwrap(); [INFO] [stdout] 7 + *m.unwrap() [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/player/random_player.rs:10:27 [INFO] [stdout] | [INFO] [stdout] 10 | fn get_legal_moves(board: &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] 10 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 10 + fn get_legal_moves(board: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | return m; [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] 15 - return m; [INFO] [stdout] 15 + m [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/player/bot_player.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | let m; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `m` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 7 ~ [INFO] [stdout] 8 ~ let m = if player == 1 { [INFO] [stdout] 9 ~ start_alpha_beta(board, player, depth) [INFO] [stdout] 10 | }else { [INFO] [stdout] 11 | let new_board = flip(board); [INFO] [stdout] 12 ~ start_alpha_beta(&new_board, player*-1, depth) [INFO] [stdout] 13 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:12:42 [INFO] [stdout] | [INFO] [stdout] 12 | m = start_alpha_beta(&new_board, player*-1, depth); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:25:39 [INFO] [stdout] | [INFO] [stdout] 25 | let score = alpha_beta(board, player*-1, depth-1, lm, 0, alpha, beta, &mut hm); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/player/bot_player.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | fn alpha_beta(board: &Vec>, player: i8, depth: i8, m: i8, old_score: i32, mut alpha: i32, mut beta: i32, hm: &mut HashMap>, i32>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | return alpha; [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] 84 - return alpha; [INFO] [stdout] 84 + alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | return beta; [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] 87 - return beta; [INFO] [stdout] 87 + beta [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/player/bot_player.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | fn alpha_beta(board: &Vec>, player: i8, depth: i8, m: i8, old_score: i32, mut alpha: i32, mut beta: i32, hm: &mut HashMap], player: i8, depth: i8, m: i8, old_score: i32, mut alpha: i32, mut beta: i32, hm: &mut HashMap>, i32>) -> i32 { [INFO] [stdout] 41 ~ let mut new_board = board.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:42:48 [INFO] [stdout] | [INFO] [stdout] 42 | let mut score = calc_score(&mut new_board, player*-1, m); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | return (score - (100 - depth as i32)) * -1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(score - (100 - depth as i32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | score = (score * player as i32 * -1) + old_score; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(score * player as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:62:48 [INFO] [stdout] | [INFO] [stdout] 62 | let new_score = alpha_beta(&new_board, player*-1, depth-1, lm, score, alpha, beta, hm); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | return con.iter().sum(); [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] 167 - return con.iter().sum(); [INFO] [stdout] 167 + con.iter().sum() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:97:14 [INFO] [stdout] | [INFO] [stdout] 97 | for i in row+1..6.min(row+4) { [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] 97 - for i in row+1..6.min(row+4) { [INFO] [stdout] 97 + for in board.iter().take(6.min(row+4)).skip(row+1) { [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/player/bot_player.rs:171:24 [INFO] [stdout] | [INFO] [stdout] 171 | fn update_board(board: &mut Vec>, player: i8, m: i8) -> usize { [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] 171 - fn update_board(board: &mut Vec>, player: i8, m: i8) -> usize { [INFO] [stdout] 171 + fn update_board(board: &mut [Vec], player: i8, m: i8) -> usize { [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/player/bot_player.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | fn get_legal_moves(board: &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] 182 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 182 + fn get_legal_moves(board: &[Vec]) -> Vec { [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/player/bot_player.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | fn flip(board: &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] 193 - fn flip(board: &Vec>) -> Vec> { [INFO] [stdout] 193 + fn flip(board: &[Vec]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:197:18 [INFO] [stdout] | [INFO] [stdout] 197 | for j in 0..7 { [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] 197 - for j in 0..7 { [INFO] [stdout] 197 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:198:31 [INFO] [stdout] | [INFO] [stdout] 198 | new_board[i].push(board[i][j]*-1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-board[i][j]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bot_player.rs:205:23 [INFO] [stdout] | [INFO] [stdout] 205 | fn count_zeros(board: &Vec>) -> i8 { [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] 205 - fn count_zeros(board: &Vec>) -> i8 { [INFO] [stdout] 205 + fn count_zeros(board: &[Vec]) -> i8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:207:14 [INFO] [stdout] | [INFO] [stdout] 207 | for i in 0..6 { [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] 207 - for i in 0..6 { [INFO] [stdout] 207 + for in board.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | for j in 0..7 { [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] 208 - for j in 0..7 { [INFO] [stdout] 208 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | return m; [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] 21 - return m; [INFO] [stdout] 21 + m [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_player.rs:33:26 [INFO] [stdout] | [INFO] [stdout] 33 | for lm in list_moves(&height) { [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | return alpha; [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 alpha; [INFO] [stdout] 98 + alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | return beta; [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] 102 - return beta; [INFO] [stdout] 102 + beta [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bit_bot_player.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | return -1 * (1000 - counter as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(1000 - counter as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_player.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | let list_moves = list_moves(&height); [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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/player/bit_bot_player.rs:107:23 [INFO] [stdout] | [INFO] [stdout] 107 | fn calc_win(bitboard: &Vec, counter: 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] 107 - fn calc_win(bitboard: &Vec, counter: usize) -> bool { [INFO] [stdout] 107 + fn calc_win(bitboard: &[i64], counter: usize) -> bool { [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/player/bit_bot_player.rs:115:23 [INFO] [stdout] | [INFO] [stdout] 115 | fn list_moves(height: &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] 115 - fn list_moves(height: &Vec) -> Vec { [INFO] [stdout] 115 + fn list_moves(height: &[i32]) -> Vec { [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/player/bit_bot_player.rs:127:26 [INFO] [stdout] | [INFO] [stdout] 127 | fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &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] 127 - fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] 127 + fn make_bitboards(board: &[Vec], bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `board` [INFO] [stdout] --> src/player/bit_bot_player.rs:131:18 [INFO] [stdout] | [INFO] [stdout] 131 | for j in 0..7 { [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] 131 - for j in 0..7 { [INFO] [stdout] 131 + for (j, ) in board.iter().enumerate().take(7) { [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/player/bit_bot_player.rs:155:22 [INFO] [stdout] | [INFO] [stdout] 155 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 155 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 155 + fn undo_move(height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_player.rs:155:47 [INFO] [stdout] | [INFO] [stdout] 155 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 155 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 155 + fn undo_move(height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_player.rs:155:69 [INFO] [stdout] | [INFO] [stdout] 155 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 155 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 155 + fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], mut counter: usize) { [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/player/bit_bot_player.rs:164:34 [INFO] [stdout] | [INFO] [stdout] 164 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 164 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 164 + fn make_move(col: usize, height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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/player/bit_bot_player.rs:164:59 [INFO] [stdout] | [INFO] [stdout] 164 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 164 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 164 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, counter: usize) { [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/player/bit_bot_player.rs:164:81 [INFO] [stdout] | [INFO] [stdout] 164 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 164 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 164 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], counter: usize) { [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/player/bit_bot_player.rs:173:42 [INFO] [stdout] | [INFO] [stdout] 173 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 173 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 173 + fn make_initial_move(col: usize, height: &mut [i32], bitboard: &mut Vec, player: usize) { [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/player/bit_bot_player.rs:173:67 [INFO] [stdout] | [INFO] [stdout] 173 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 173 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 173 + fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut [i64], player: usize) { [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/player/bit_bot_player.rs:180:16 [INFO] [stdout] | [INFO] [stdout] 180 | fn flip(board: &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] 180 - fn flip(board: &Vec>) -> Vec> { [INFO] [stdout] 180 + fn flip(board: &[Vec]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bit_bot_player.rs:184:18 [INFO] [stdout] | [INFO] [stdout] 184 | for j in 0..7 { [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] 184 - for j in 0..7 { [INFO] [stdout] 184 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bit_bot_player.rs:185:31 [INFO] [stdout] | [INFO] [stdout] 185 | new_board[i].push(board[i][j]*-1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-board[i][j]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bit_bot_player.rs:192:31 [INFO] [stdout] | [INFO] [stdout] 192 | fn _print_bitboards(bitboard: &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] 192 - fn _print_bitboards(bitboard: &Vec) { [INFO] [stdout] 192 + fn _print_bitboards(bitboard: &[i64]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bitboard` [INFO] [stdout] --> src/player/bit_bot_player.rs:193:14 [INFO] [stdout] | [INFO] [stdout] 193 | for i in 0..2 { [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] 193 - for i in 0..2 { [INFO] [stdout] 193 + for in bitboard.iter().take(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | return m; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return m; [INFO] [stdout] 22 + m [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | for lm in list_moves(&height) { [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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/player/bit_bot_loop_player.rs:69:33 [INFO] [stdout] | [INFO] [stdout] 69 | queue[counter] = list_moves(&height); [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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: length comparison to zero [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:75:12 [INFO] [stdout] | [INFO] [stdout] 75 | if queue[counter].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue[counter].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:90:45 [INFO] [stdout] | [INFO] [stdout] 90 | queue[counter] = list_moves(&height); [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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: length comparison to zero [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:91:20 [INFO] [stdout] | [INFO] [stdout] 91 | if queue[counter].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `queue[counter].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/player/bit_bot_loop_player.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | if queue[counter].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `queue[counter].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:138:23 [INFO] [stdout] | [INFO] [stdout] 138 | fn calc_win(bitboard: &Vec, counter: 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] 138 - fn calc_win(bitboard: &Vec, counter: usize) -> bool { [INFO] [stdout] 138 + fn calc_win(bitboard: &[i64], counter: usize) -> bool { [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/player/bit_bot_loop_player.rs:146:23 [INFO] [stdout] | [INFO] [stdout] 146 | fn list_moves(height: &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] 146 - fn list_moves(height: &Vec) -> Vec { [INFO] [stdout] 146 + fn list_moves(height: &[i32]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `height` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:149:14 [INFO] [stdout] | [INFO] [stdout] 149 | for i in 0..7 { [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] 149 - for i in 0..7 { [INFO] [stdout] 149 + for (i, ) in height.iter().enumerate().take(7) { [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/player/bit_bot_loop_player.rs:158:26 [INFO] [stdout] | [INFO] [stdout] 158 | fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &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] 158 - fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] 158 + fn make_bitboards(board: &[Vec], bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `board` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:162:18 [INFO] [stdout] | [INFO] [stdout] 162 | for j in 0..7 { [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] 162 - for j in 0..7 { [INFO] [stdout] 162 + for (j, ) in board.iter().enumerate().take(7) { [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/player/bit_bot_loop_player.rs:186:22 [INFO] [stdout] | [INFO] [stdout] 186 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 186 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 186 + fn undo_move(height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_loop_player.rs:186:47 [INFO] [stdout] | [INFO] [stdout] 186 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 186 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 186 + fn undo_move(height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_loop_player.rs:186:69 [INFO] [stdout] | [INFO] [stdout] 186 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 186 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 186 + fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], mut counter: usize) { [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/player/bit_bot_loop_player.rs:195:34 [INFO] [stdout] | [INFO] [stdout] 195 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 195 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 195 + fn make_move(col: usize, height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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/player/bit_bot_loop_player.rs:195:59 [INFO] [stdout] | [INFO] [stdout] 195 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 195 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 195 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, counter: usize) { [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/player/bit_bot_loop_player.rs:195:81 [INFO] [stdout] | [INFO] [stdout] 195 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 195 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 195 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], counter: usize) { [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/player/bit_bot_loop_player.rs:204:42 [INFO] [stdout] | [INFO] [stdout] 204 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 204 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 204 + fn make_initial_move(col: usize, height: &mut [i32], bitboard: &mut Vec, player: usize) { [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/player/bit_bot_loop_player.rs:204:67 [INFO] [stdout] | [INFO] [stdout] 204 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 204 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 204 + fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut [i64], player: usize) { [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/player/bit_bot_loop_player.rs:211:16 [INFO] [stdout] | [INFO] [stdout] 211 | fn flip(board: &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] 211 - fn flip(board: &Vec>) -> Vec> { [INFO] [stdout] 211 + fn flip(board: &[Vec]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:215:18 [INFO] [stdout] | [INFO] [stdout] 215 | for j in 0..7 { [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] 215 - for j in 0..7 { [INFO] [stdout] 215 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:216:31 [INFO] [stdout] | [INFO] [stdout] 216 | new_board[i].push(board[i][j]*-1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-board[i][j]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:223:31 [INFO] [stdout] | [INFO] [stdout] 223 | fn _print_bitboards(bitboard: &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] 223 - fn _print_bitboards(bitboard: &Vec) { [INFO] [stdout] 223 + fn _print_bitboards(bitboard: &[i64]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bitboard` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:224:14 [INFO] [stdout] | [INFO] [stdout] 224 | for i in 0..2 { [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] 224 - for i in 0..2 { [INFO] [stdout] 224 + for in bitboard.iter().take(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/human_player_ui.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | return potential_move; [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] 8 - return potential_move; [INFO] [stdout] 8 + potential_move [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/player/human_player_ui.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | fn get_legal_moves(board: &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] 12 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 12 + fn get_legal_moves(board: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | 5 => return human_player_ui::get_move(&board, potential_move), [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 - 5 => return human_player_ui::get_move(&board, potential_move), [INFO] [stdout] 29 + 5 => human_player_ui::get_move(&board, potential_move), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | 4 => return human_player::get_move(&board), [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] 30 - 4 => return human_player::get_move(&board), [INFO] [stdout] 30 + 4 => human_player::get_move(&board), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:31:18 [INFO] [stdout] | [INFO] [stdout] 31 | 3 => return bit_bot_player::get_move(&board, self.player), [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] 31 - 3 => return bit_bot_player::get_move(&board, self.player), [INFO] [stdout] 31 + 3 => bit_bot_player::get_move(&board, self.player), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:32:18 [INFO] [stdout] | [INFO] [stdout] 32 | 2 => return bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - 2 => return bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] 32 + 2 => bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | 1 => return bot_player::get_move(&board, self.player), [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] 33 - 1 => return bot_player::get_move(&board, self.player), [INFO] [stdout] 33 + 1 => bot_player::get_move(&board, self.player), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | _ => return random_player::get_move(&board), [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] 34 - _ => return random_player::get_move(&board), [INFO] [stdout] 34 + _ => random_player::get_move(&board), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player.rs:29:51 [INFO] [stdout] | [INFO] [stdout] 29 | 5 => return human_player_ui::get_move(&board, potential_move), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:30:48 [INFO] [stdout] | [INFO] [stdout] 30 | 4 => return human_player::get_move(&board), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:31:50 [INFO] [stdout] | [INFO] [stdout] 31 | 3 => return bit_bot_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:32:55 [INFO] [stdout] | [INFO] [stdout] 32 | 2 => return bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:33:46 [INFO] [stdout] | [INFO] [stdout] 33 | 1 => return bot_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:34:49 [INFO] [stdout] | [INFO] [stdout] 34 | _ => return random_player::get_move(&board), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/player.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | if m < 0 || m > 4 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use: `!(0..=4).contains(&m)` [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: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/ui.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | let ui = Arc::new(AppWindow::new()?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `AppWindow` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `AppWindow` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/ui.rs:69:44 [INFO] [stdout] | [INFO] [stdout] 69 | let old_pieces = ui.get_pieces().iter().map(|p| p.clone()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `slint::ModelRc` [INFO] [stdout] --> src/ui.rs:72:19 [INFO] [stdout] | [INFO] [stdout] 72 | ui.set_pieces(pieces.into()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider removing `.into()`: `pieces` [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: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/ui.rs:82:18 [INFO] [stdout] | [INFO] [stdout] 82 | for j in 0..7 { [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] 82 - for j in 0..7 { [INFO] [stdout] 82 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `slint::ModelRc>` [INFO] [stdout] --> src/ui.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 100 | ui.set_board(mr.into()); [INFO] [stdout] | ^^^^^^^^^ help: consider removing `.into()`: `mr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/game.rs:89:14 [INFO] [stdout] | [INFO] [stdout] 89 | 1 => return 1, [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] 89 - 1 => return 1, [INFO] [stdout] 89 + 1 => 1, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/game.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | _ => return -1, [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] 90 - _ => return -1, [INFO] [stdout] 90 + _ => -1, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:157:36 [INFO] [stdout] | [INFO] [stdout] 157 | let play = player.play(&board, g.potential_move); [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/game.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | player.play(&board, -1) [INFO] [stdout] | ^^^^^^ help: change this to: `board` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/player/bot_player.rs:94:19 [INFO] [stdout] | [INFO] [stdout] 94 | let mut con = vec![1,1,1,1]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `[1,1,1,1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/player/bit_bot_player.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | for i in vec![3,2,4,1,5,0,6] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[3,2,4,1,5,0,6]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:8:17 [INFO] [stdout] | [INFO] [stdout] 8 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerButton_root_16 { [INFO] [stdout] | ^----------------- ------------------- `InnerButton_root_16` is not local [INFO] [stdout] | | [INFO] [stdout] | `Unpin` is not local [INFO] [stdout] | move the `impl` block outside of this associated constant `FIELD_OFFSETS` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` may come from an old version of the `const_field_offset_macro` crate, try updating your dependency with `cargo update -p const_field_offset_macro` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `sp::FieldOffsets` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] pub struct InnerAppWindow { [INFO] [stdout] | ^----------------- -------------- `InnerAppWindow` is not local [INFO] [stdout] | | [INFO] [stdout] | `Unpin` is not local [INFO] [stdout] | move the `impl` block outside of this associated constant `FIELD_OFFSETS` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` may come from an old version of the `const_field_offset_macro` crate, try updating your dependency with `cargo update -p const_field_offset_macro` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `sp::FieldOffsets` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:1872:17 [INFO] [stdout] | [INFO] [stdout] 1872 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] struct InnerComponent_rectangle_12 { [INFO] [stdout] | ^----------------- --------------------------- `InnerComponent_rectangle_12` is not local [INFO] [stdout] | | [INFO] [stdout] | `Unpin` is not local [INFO] [stdout] | move the `impl` block outside of this associated constant `FIELD_OFFSETS` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` may come from an old version of the `const_field_offset_macro` crate, try updating your dependency with `cargo update -p const_field_offset_macro` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `sp::FieldOffsets` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:2090:14 [INFO] [stdout] | [INFO] [stdout] 2088 | fn drop (self : core :: pin :: Pin < & mut InnerComponent_rectangle_12 >) { [INFO] [stdout] | ------------------------------------------------------------------------- move the `impl` block outside of this method `drop` [INFO] [stdout] 2089 | use slint :: private_unstable_api :: re_exports :: * ; [INFO] [stdout] 2090 | ItemTreeVTable_static ! (static VT for self :: InnerComponent_rectangle_12) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------------------^ [INFO] [stdout] | | | [INFO] [stdout] | | `InnerComponent_rectangle_12` is not local [INFO] [stdout] | `HasStaticVTable` is not local [INFO] [stdout] | `ItemTreeVTable` is not local [INFO] [stdout] | [INFO] [stdout] = note: the macro `ItemTreeVTable_static` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the macro `ItemTreeVTable_static` may come from an old version of the `i_slint_core` crate, try updating your dependency with `cargo update -p i_slint_core` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the macro `ItemTreeVTable_static` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:2294:14 [INFO] [stdout] | [INFO] [stdout] 2292 | fn drop (self : core :: pin :: Pin < & mut InnerAppWindow >) { [INFO] [stdout] | ------------------------------------------------------------ move the `impl` block outside of this method `drop` [INFO] [stdout] 2293 | use slint :: private_unstable_api :: re_exports :: * ; [INFO] [stdout] 2294 | ItemTreeVTable_static ! (static VT for self :: InnerAppWindow) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------^ [INFO] [stdout] | | | [INFO] [stdout] | | `InnerAppWindow` is not local [INFO] [stdout] | `HasStaticVTable` is not local [INFO] [stdout] | `ItemTreeVTable` is not local [INFO] [stdout] | [INFO] [stdout] = note: the macro `ItemTreeVTable_static` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the macro `ItemTreeVTable_static` may come from an old version of the `i_slint_core` crate, try updating your dependency with `cargo update -p i_slint_core` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the macro `ItemTreeVTable_static` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:9:22 [INFO] [stdout] | [INFO] [stdout] 8 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerButton_root_16 { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 9 | ...ot_16 : sp :: r#Empty , r#native_18 : sp :: r#NativeButton , r#root_16_empty_17_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_16_empty_17_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_16_empty_17_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_16_height : sp :: Property < sp :: LogicalLength > , r#root_16_native_18_y : sp :: Property < sp :: LogicalLength > , r#root_16_width : sp :: Property < sp :: LogicalLength > , r#root_16_x : sp :: Property < sp :: LogicalLength > , r#root_16_y : sp :: Property < sp :: LogicalLength > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerButton_root_16 >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] | ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 9 - r#root_16 : sp :: r#Empty , r#native_18 : sp :: r#NativeButton , r#root_16_empty_17_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_16_empty_17_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_16_empty_17_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_16_height : sp :: Property < sp :: LogicalLength > , r#root_16_native_18_y : sp :: Property < sp :: LogicalLength > , r#root_16_width : sp :: Property < sp :: LogicalLength > , r#root_16_x : sp :: Property < sp :: LogicalLength > , r#root_16_y : sp :: Property < sp :: LogicalLength > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerButton_root_16 >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] 9 + r#root_16 : () , r#native_18 : () , r#root_16_empty_17_layout_cache : () , r#root_16_empty_17_layoutinfo_h : () , r#root_16_empty_17_layoutinfo_v : () , r#root_16_height : () , r#root_16_native_18_y : () , r#root_16_width : () , r#root_16_x : () , r#root_16_y : () , self_weak : () , root : () , tree_index : () , tree_index_of_first_child : () , } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:210:21 [INFO] [stdout] | [INFO] [stdout] 209 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] pub struct InnerAppWindow { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 210 | ...ot_1 : sp :: r#WindowItem , r#text_3 : sp :: r#Text , r#empty_4 : sp :: r#Empty , r#text_10 : sp :: r#Text , r#rectangle_11 : sp :: r#Empty , r#button_5 : InnerButton_root_16 , r#button_6 : InnerButton_root_16 , r#button_7 : InnerButton_root_16 , r#button_8 : InnerButton_root_16 , r#button_9 : InnerButton_root_16 , r#button_15 : InnerButton_root_16 , r#root_1_board : sp :: Property < sp :: ModelRc < sp :: ModelRc < i32 > > > , r#root_1_empty_2_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_2_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_2_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_4_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_width : sp :: Property < sp :: LogicalLength > , r#root_1_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_pieces : sp :: Property < sp :: ModelRc < r#pieceData > > , r#root_1_player : sp :: Property < i32 > , r#root_1_player_1_type : sp :: Property < i32 > , r#root_1_player_2_type : sp :: Property < i32 > , r#root_1_player_type : sp :: Property < i32 > , r#root_1_won_massage : sp :: Property < sp :: SharedString > , r#root_1_x : sp :: Property < sp :: LogicalLength > , r#root_1_y : sp :: Property < sp :: LogicalLength > , r#root_1_clicked_board_box : sp :: Callback < (i32 ,) , () > , r#root_1_request_run_game : sp :: Callback < () , () > , r#root_1_set_player_type : sp :: Callback < () , () > , repeater0 : sp :: Repeater < InnerComponent_rectangle_12 > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerAppWindow >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , globals : Globals_AppWindow , window_adapter_ : sp :: OnceCell < sp :: WindowAdapterRc > , } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^ ^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 210 - r#root_1 : sp :: r#WindowItem , r#text_3 : sp :: r#Text , r#empty_4 : sp :: r#Empty , r#text_10 : sp :: r#Text , r#rectangle_11 : sp :: r#Empty , r#button_5 : InnerButton_root_16 , r#button_6 : InnerButton_root_16 , r#button_7 : InnerButton_root_16 , r#button_8 : InnerButton_root_16 , r#button_9 : InnerButton_root_16 , r#button_15 : InnerButton_root_16 , r#root_1_board : sp :: Property < sp :: ModelRc < sp :: ModelRc < i32 > > > , r#root_1_empty_2_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_2_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_2_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layout_cache : sp :: Property < sp :: SharedVector < sp :: Coord , > > , r#root_1_empty_4_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_empty_4_width : sp :: Property < sp :: LogicalLength > , r#root_1_layoutinfo_h : sp :: Property < sp :: LayoutInfo > , r#root_1_layoutinfo_v : sp :: Property < sp :: LayoutInfo > , r#root_1_pieces : sp :: Property < sp :: ModelRc < r#pieceData > > , r#root_1_player : sp :: Property < i32 > , r#root_1_player_1_type : sp :: Property < i32 > , r#root_1_player_2_type : sp :: Property < i32 > , r#root_1_player_type : sp :: Property < i32 > , r#root_1_won_massage : sp :: Property < sp :: SharedString > , r#root_1_x : sp :: Property < sp :: LogicalLength > , r#root_1_y : sp :: Property < sp :: LogicalLength > , r#root_1_clicked_board_box : sp :: Callback < (i32 ,) , () > , r#root_1_request_run_game : sp :: Callback < () , () > , r#root_1_set_player_type : sp :: Callback < () , () > , repeater0 : sp :: Repeater < InnerComponent_rectangle_12 > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerAppWindow >> , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , globals : Globals_AppWindow , window_adapter_ : sp :: OnceCell < sp :: WindowAdapterRc > , } [INFO] [stdout] 210 + r#root_1 : () , r#text_3 : () , r#empty_4 : () , r#text_10 : () , r#rectangle_11 : () , r#button_5 : () , r#button_6 : () , r#button_7 : () , r#button_8 : () , r#button_9 : () , r#button_15 : () , r#root_1_board : () , r#root_1_empty_2_layout_cache : () , r#root_1_empty_2_layoutinfo_h : () , r#root_1_empty_2_layoutinfo_v : () , r#root_1_empty_4_layout_cache : () , r#root_1_empty_4_layoutinfo_h : () , r#root_1_empty_4_layoutinfo_v : () , r#root_1_empty_4_width : () , r#root_1_layoutinfo_h : () , r#root_1_layoutinfo_v : () , r#root_1_pieces : () , r#root_1_player : () , r#root_1_player_1_type : () , r#root_1_player_2_type : () , r#root_1_player_type : () , r#root_1_won_massage : () , r#root_1_x : () , r#root_1_y : () , r#root_1_clicked_board_box : () , r#root_1_request_run_game : () , r#root_1_set_player_type : () , repeater0 : () , self_weak : () , root : () , tree_index : () , tree_index_of_first_child : () , globals : () , window_adapter_ : () , } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple fields are never read [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:1873:27 [INFO] [stdout] | [INFO] [stdout] 1872 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] struct InnerComponent_rectangle_12 { [INFO] [stdout] | ------------------ fields in this struct [INFO] [stdout] 1873 | ...ctangle_12 : sp :: r#Rectangle , r#toucharea_13 : sp :: r#TouchArea , r#model_data : sp :: Property < r#pieceData > , r#model_index : sp :: Property < i32 > , r#rectangle_12_player_piece : sp :: Property < i32 > , r#rectangle_12_toucharea_13_x : sp :: Property < sp :: LogicalLength > , r#rectangle_12_toucharea_13_y : sp :: Property < sp :: LogicalLength > , r#rectangle_12_clicked : sp :: Callback < () , () > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerComponent_rectangle_12 >> , parent : sp :: VWeakMapped :: < sp :: ItemTreeVTable , InnerAppWindow > , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] help: consider changing the fields to be of unit type to suppress this warning while preserving the field numbering, or remove the fields [INFO] [stdout] | [INFO] [stdout] 1873 - r#rectangle_12 : sp :: r#Rectangle , r#toucharea_13 : sp :: r#TouchArea , r#model_data : sp :: Property < r#pieceData > , r#model_index : sp :: Property < i32 > , r#rectangle_12_player_piece : sp :: Property < i32 > , r#rectangle_12_toucharea_13_x : sp :: Property < sp :: LogicalLength > , r#rectangle_12_toucharea_13_y : sp :: Property < sp :: LogicalLength > , r#rectangle_12_clicked : sp :: Callback < () , () > , self_weak : sp :: OnceCell < sp :: VWeakMapped < sp :: ItemTreeVTable , InnerComponent_rectangle_12 >> , parent : sp :: VWeakMapped :: < sp :: ItemTreeVTable , InnerAppWindow > , root : sp :: OnceCell < sp :: VWeak < sp :: ItemTreeVTable , InnerAppWindow >> , tree_index : :: core :: cell :: Cell < u32 > , tree_index_of_first_child : :: core :: cell :: Cell < u32 > , } [INFO] [stdout] 1873 + r#rectangle_12 : () , r#toucharea_13 : () , r#model_data : () , r#model_index : () , r#rectangle_12_player_piece : () , r#rectangle_12_toucharea_13_x : () , r#rectangle_12_toucharea_13_y : () , r#rectangle_12_clicked : () , self_weak : () , parent : () , root : () , tree_index : () , tree_index_of_first_child : () , } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/board.rs:26:48 [INFO] [stdout] | [INFO] [stdout] 26 | println!("The winning player is '{}'", player * -1); [INFO] [stdout] | ^^^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] = note: `#[warn(clippy::neg_multiply)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/board.rs:28:16 [INFO] [stdout] | [INFO] [stdout] 28 | return player * -1 * 2; [INFO] [stdout] | ^^^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/board.rs:47:22 [INFO] [stdout] | [INFO] [stdout] 47 | fn legal_move(board: &Vec>, m: i8) -> 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] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 47 - fn legal_move(board: &Vec>, m: i8) -> bool { [INFO] [stdout] 47 + fn legal_move(board: &[Vec], m: i8) -> bool { [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/board.rs:57:17 [INFO] [stdout] | [INFO] [stdout] 57 | fn movee(board: &mut Vec>, m: i8, player: i8) -> usize { [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] 57 - fn movee(board: &mut Vec>, m: i8, player: i8) -> usize { [INFO] [stdout] 57 + fn movee(board: &mut [Vec], m: i8, player: i8) -> usize { [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/board.rs:68:20 [INFO] [stdout] | [INFO] [stdout] 68 | fn find_win(board: &Vec>) -> 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] 68 - fn find_win(board: &Vec>) -> bool { [INFO] [stdout] 68 + fn find_win(board: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/board.rs:70:18 [INFO] [stdout] | [INFO] [stdout] 70 | for j in 0..7 { [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 [INFO] [stdout] | [INFO] [stdout] 70 - for j in 0..7 { [INFO] [stdout] 70 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:71:13 [INFO] [stdout] | [INFO] [stdout] 71 | / if board[i][j] != 0 { [INFO] [stdout] 72 | | if board[i][j] == board[i-1][j] && board[i][j] == board[i-2][j] && board[i][j] == board[i-3][j] { [INFO] [stdout] 73 | | return true; [INFO] [stdout] 74 | | } [INFO] [stdout] 75 | | } [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] 71 ~ if board[i][j] != 0 [INFO] [stdout] 72 ~ && board[i][j] == board[i-1][j] && board[i][j] == board[i-2][j] && board[i][j] == board[i-3][j] { [INFO] [stdout] 73 | return true; [INFO] [stdout] 74 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/board.rs:78:14 [INFO] [stdout] | [INFO] [stdout] 78 | for i in 0..6 { [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] 78 - for i in 0..6 { [INFO] [stdout] 78 + for in board.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:80:13 [INFO] [stdout] | [INFO] [stdout] 80 | / if board[i][j] != 0 { [INFO] [stdout] 81 | | if board[i][j] == board[i][j+1] && board[i][j] == board[i][j+2] && board[i][j] == board[i][j+3] { [INFO] [stdout] 82 | | return true; [INFO] [stdout] 83 | | } [INFO] [stdout] 84 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 80 ~ if board[i][j] != 0 [INFO] [stdout] 81 ~ && board[i][j] == board[i][j+1] && board[i][j] == board[i][j+2] && board[i][j] == board[i][j+3] { [INFO] [stdout] 82 | return true; [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:89:13 [INFO] [stdout] | [INFO] [stdout] 89 | / if board[i][j] != 0 { [INFO] [stdout] 90 | | if board[i][j] == board[i-1][j+1] && board[i][j] == board[i-2][j+2] && board[i][j] == board[i-3][j+3] { [INFO] [stdout] 91 | | return true; [INFO] [stdout] 92 | | } [INFO] [stdout] 93 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 89 ~ if board[i][j] != 0 [INFO] [stdout] 90 ~ && board[i][j] == board[i-1][j+1] && board[i][j] == board[i-2][j+2] && board[i][j] == board[i-3][j+3] { [INFO] [stdout] 91 | return true; [INFO] [stdout] 92 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/board.rs:98:13 [INFO] [stdout] | [INFO] [stdout] 98 | / if board[i][j] != 0 { [INFO] [stdout] 99 | | if board[i][j] == board[i+1][j+1] && board[i][j] == board[i+2][j+2] && board[i][j] == board[i+3][j+3] { [INFO] [stdout] 100 | | return true; [INFO] [stdout] 101 | | } [INFO] [stdout] 102 | | } [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] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 98 ~ if board[i][j] != 0 [INFO] [stdout] 99 ~ && board[i][j] == board[i+1][j+1] && board[i][j] == board[i+2][j+2] && board[i][j] == board[i+3][j+3] { [INFO] [stdout] 100 | return true; [INFO] [stdout] 101 ~ } [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/board.rs:109:21 [INFO] [stdout] | [INFO] [stdout] 109 | fn find_draw(board: &Vec>) -> 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] 109 - fn find_draw(board: &Vec>) -> bool { [INFO] [stdout] 109 + fn find_draw(board: &[Vec]) -> bool { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/board.rs:110:14 [INFO] [stdout] | [INFO] [stdout] 110 | for i in 0..7 { [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] 110 - for i in 0..7 { [INFO] [stdout] 110 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `legal_move` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:165:28 [INFO] [stdout] | [INFO] [stdout] 165 | assert!(legal_move(&mut board, 0)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 165 - assert!(legal_move(&mut board, 0)); [INFO] [stdout] 165 + assert!(legal_move(&board, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `legal_move` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:166:29 [INFO] [stdout] | [INFO] [stdout] 166 | assert!(!legal_move(&mut board, -1)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 166 - assert!(!legal_move(&mut board, -1)); [INFO] [stdout] 166 + assert!(!legal_move(&board, -1)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `legal_move` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:167:29 [INFO] [stdout] | [INFO] [stdout] 167 | assert!(!legal_move(&mut board, 7)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 167 - assert!(!legal_move(&mut board, 7)); [INFO] [stdout] 167 + assert!(!legal_move(&board, 7)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `legal_move` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:173:28 [INFO] [stdout] | [INFO] [stdout] 173 | assert!(legal_move(&mut board, 0)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 173 - assert!(legal_move(&mut board, 0)); [INFO] [stdout] 173 + assert!(legal_move(&board, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `legal_move` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:175:29 [INFO] [stdout] | [INFO] [stdout] 175 | assert!(!legal_move(&mut board, 0)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 175 - assert!(!legal_move(&mut board, 0)); [INFO] [stdout] 175 + assert!(!legal_move(&board, 0)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `find_win` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:185:26 [INFO] [stdout] | [INFO] [stdout] 185 | assert!(find_win(&mut board)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 185 - assert!(find_win(&mut board)); [INFO] [stdout] 185 + assert!(find_win(&board)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `find_win` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:195:26 [INFO] [stdout] | [INFO] [stdout] 195 | assert!(find_win(&mut board)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 195 - assert!(find_win(&mut board)); [INFO] [stdout] 195 + assert!(find_win(&board)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `find_win` doesn't need a mutable reference [INFO] [stdout] --> src/board.rs:205:26 [INFO] [stdout] | [INFO] [stdout] 205 | assert!(find_win(&mut board)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 205 - assert!(find_win(&mut board)); [INFO] [stdout] 205 + assert!(find_win(&board)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/human_player.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | return m.parse::().unwrap(); [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] 15 - return m.parse::().unwrap(); [INFO] [stdout] 15 + m.parse::().unwrap() [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/player/human_player.rs:19:27 [INFO] [stdout] | [INFO] [stdout] 19 | fn get_legal_moves(board: &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] 19 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 19 + fn get_legal_moves(board: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/random_player.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | return *m.unwrap(); [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] 7 - return *m.unwrap(); [INFO] [stdout] 7 + *m.unwrap() [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/player/random_player.rs:10:27 [INFO] [stdout] | [INFO] [stdout] 10 | fn get_legal_moves(board: &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] 10 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 10 + fn get_legal_moves(board: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | return m; [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] 15 - return m; [INFO] [stdout] 15 + m [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/player/bot_player.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | let m; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `m` here and remove the assignments from the branches [INFO] [stdout] | [INFO] [stdout] 7 ~ [INFO] [stdout] 8 ~ let m = if player == 1 { [INFO] [stdout] 9 ~ start_alpha_beta(board, player, depth) [INFO] [stdout] 10 | }else { [INFO] [stdout] 11 | let new_board = flip(board); [INFO] [stdout] 12 ~ start_alpha_beta(&new_board, player*-1, depth) [INFO] [stdout] 13 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:12:42 [INFO] [stdout] | [INFO] [stdout] 12 | m = start_alpha_beta(&new_board, player*-1, depth); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:25:39 [INFO] [stdout] | [INFO] [stdout] 25 | let score = alpha_beta(board, player*-1, depth-1, lm, 0, alpha, beta, &mut hm); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this function has too many arguments (8/7) [INFO] [stdout] --> src/player/bot_player.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | fn alpha_beta(board: &Vec>, player: i8, depth: i8, m: i8, old_score: i32, mut alpha: i32, mut beta: i32, hm: &mut HashMap>, i32>) -> i32 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments [INFO] [stdout] = note: `#[warn(clippy::too_many_arguments)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | return alpha; [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] 84 - return alpha; [INFO] [stdout] 84 + alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:87:9 [INFO] [stdout] | [INFO] [stdout] 87 | return beta; [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] 87 - return beta; [INFO] [stdout] 87 + beta [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/player/bot_player.rs:40:22 [INFO] [stdout] | [INFO] [stdout] 40 | fn alpha_beta(board: &Vec>, player: i8, depth: i8, m: i8, old_score: i32, mut alpha: i32, mut beta: i32, hm: &mut HashMap], player: i8, depth: i8, m: i8, old_score: i32, mut alpha: i32, mut beta: i32, hm: &mut HashMap>, i32>) -> i32 { [INFO] [stdout] 41 ~ let mut new_board = board.to_owned(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:42:48 [INFO] [stdout] | [INFO] [stdout] 42 | let mut score = calc_score(&mut new_board, player*-1, m); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:52:20 [INFO] [stdout] | [INFO] [stdout] 52 | return (score - (100 - depth as i32)) * -1; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(score - (100 - depth as i32))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:55:13 [INFO] [stdout] | [INFO] [stdout] 55 | score = (score * player as i32 * -1) + old_score; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(score * player as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:62:48 [INFO] [stdout] | [INFO] [stdout] 62 | let new_score = alpha_beta(&new_board, player*-1, depth-1, lm, score, alpha, beta, hm); [INFO] [stdout] | ^^^^^^^^^ help: consider using: `-player` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bot_player.rs:167:5 [INFO] [stdout] | [INFO] [stdout] 167 | return con.iter().sum(); [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] 167 - return con.iter().sum(); [INFO] [stdout] 167 + con.iter().sum() [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:97:14 [INFO] [stdout] | [INFO] [stdout] 97 | for i in row+1..6.min(row+4) { [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] 97 - for i in row+1..6.min(row+4) { [INFO] [stdout] 97 + for in board.iter().take(6.min(row+4)).skip(row+1) { [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/player/bot_player.rs:171:24 [INFO] [stdout] | [INFO] [stdout] 171 | fn update_board(board: &mut Vec>, player: i8, m: i8) -> usize { [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] 171 - fn update_board(board: &mut Vec>, player: i8, m: i8) -> usize { [INFO] [stdout] 171 + fn update_board(board: &mut [Vec], player: i8, m: i8) -> usize { [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/player/bot_player.rs:182:27 [INFO] [stdout] | [INFO] [stdout] 182 | fn get_legal_moves(board: &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] 182 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 182 + fn get_legal_moves(board: &[Vec]) -> Vec { [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/player/bot_player.rs:193:16 [INFO] [stdout] | [INFO] [stdout] 193 | fn flip(board: &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] 193 - fn flip(board: &Vec>) -> Vec> { [INFO] [stdout] 193 + fn flip(board: &[Vec]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:197:18 [INFO] [stdout] | [INFO] [stdout] 197 | for j in 0..7 { [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] 197 - for j in 0..7 { [INFO] [stdout] 197 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:198:31 [INFO] [stdout] | [INFO] [stdout] 198 | new_board[i].push(board[i][j]*-1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-board[i][j]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bot_player.rs:205:23 [INFO] [stdout] | [INFO] [stdout] 205 | fn count_zeros(board: &Vec>) -> i8 { [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] 205 - fn count_zeros(board: &Vec>) -> i8 { [INFO] [stdout] 205 + fn count_zeros(board: &[Vec]) -> i8 { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:207:14 [INFO] [stdout] | [INFO] [stdout] 207 | for i in 0..6 { [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] 207 - for i in 0..6 { [INFO] [stdout] 207 + for in board.iter().take(6) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bot_player.rs:208:18 [INFO] [stdout] | [INFO] [stdout] 208 | for j in 0..7 { [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] 208 - for j in 0..7 { [INFO] [stdout] 208 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `alpha_beta` doesn't need a mutable reference [INFO] [stdout] --> src/player/bot_player.rs:296:31 [INFO] [stdout] | [INFO] [stdout] 296 | assert_eq!(alpha_beta(&mut board, 1*-1, 5, 2, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 296 - assert_eq!(alpha_beta(&mut board, 1*-1, 5, 2, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] 296 + assert_eq!(alpha_beta(&board, 1*-1, 5, 2, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:296:43 [INFO] [stdout] | [INFO] [stdout] 296 | assert_eq!(alpha_beta(&mut board, 1*-1, 5, 2, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] | ^^^^ help: consider using: `-1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/player/bot_player.rs:296:43 [INFO] [stdout] | [INFO] [stdout] 296 | assert_eq!(alpha_beta(&mut board, 1*-1, 5, 2, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] | ^^^^ help: consider reducing it to: `-1` [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: the function `alpha_beta` doesn't need a mutable reference [INFO] [stdout] --> src/player/bot_player.rs:307:31 [INFO] [stdout] | [INFO] [stdout] 307 | assert_eq!(alpha_beta(&mut board, -1*-1, 5, 6, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 307 - assert_eq!(alpha_beta(&mut board, -1*-1, 5, 6, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] 307 + assert_eq!(alpha_beta(&board, -1*-1, 5, 6, 0, -100000, 100000, &mut hm), 1000); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `alpha_beta` doesn't need a mutable reference [INFO] [stdout] --> src/player/bot_player.rs:316:31 [INFO] [stdout] | [INFO] [stdout] 316 | assert_eq!(alpha_beta(&mut board, 1*-1, 1, 2, 0, -100000, 100000, &mut hm), -900); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 316 - assert_eq!(alpha_beta(&mut board, 1*-1, 1, 2, 0, -100000, 100000, &mut hm), -900); [INFO] [stdout] 316 + assert_eq!(alpha_beta(&board, 1*-1, 1, 2, 0, -100000, 100000, &mut hm), -900); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bot_player.rs:316:43 [INFO] [stdout] | [INFO] [stdout] 316 | assert_eq!(alpha_beta(&mut board, 1*-1, 1, 2, 0, -100000, 100000, &mut hm), -900); [INFO] [stdout] | ^^^^ help: consider using: `-1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this operation has no effect [INFO] [stdout] --> src/player/bot_player.rs:316:43 [INFO] [stdout] | [INFO] [stdout] 316 | assert_eq!(alpha_beta(&mut board, 1*-1, 1, 2, 0, -100000, 100000, &mut hm), -900); [INFO] [stdout] | ^^^^ help: consider reducing it to: `-1` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#identity_op [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `count_zeros` doesn't need a mutable reference [INFO] [stdout] --> src/player/bot_player.rs:328:40 [INFO] [stdout] | [INFO] [stdout] 328 | let depth = 10.min(count_zeros(&mut board)); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 328 - let depth = 10.min(count_zeros(&mut board)); [INFO] [stdout] 328 + let depth = 10.min(count_zeros(&board)); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `start_alpha_beta` doesn't need a mutable reference [INFO] [stdout] --> src/player/bot_player.rs:329:39 [INFO] [stdout] | [INFO] [stdout] 329 | let result = start_alpha_beta(&mut board, 1, depth); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 329 - let result = start_alpha_beta(&mut board, 1, depth); [INFO] [stdout] 329 + let result = start_alpha_beta(&board, 1, depth); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | return m; [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] 21 - return m; [INFO] [stdout] 21 + m [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_player.rs:33:26 [INFO] [stdout] | [INFO] [stdout] 33 | for lm in list_moves(&height) { [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:98:9 [INFO] [stdout] | [INFO] [stdout] 98 | return alpha; [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 alpha; [INFO] [stdout] 98 + alpha [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:102:9 [INFO] [stdout] | [INFO] [stdout] 102 | return beta; [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] 102 - return beta; [INFO] [stdout] 102 + beta [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bit_bot_player.rs:64:20 [INFO] [stdout] | [INFO] [stdout] 64 | return -1 * (1000 - counter as i32); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using: `-(1000 - counter as i32)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_player.rs:67:33 [INFO] [stdout] | [INFO] [stdout] 67 | let list_moves = list_moves(&height); [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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/player/bit_bot_player.rs:107:23 [INFO] [stdout] | [INFO] [stdout] 107 | fn calc_win(bitboard: &Vec, counter: 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] 107 - fn calc_win(bitboard: &Vec, counter: usize) -> bool { [INFO] [stdout] 107 + fn calc_win(bitboard: &[i64], counter: usize) -> bool { [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/player/bit_bot_player.rs:115:23 [INFO] [stdout] | [INFO] [stdout] 115 | fn list_moves(height: &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] 115 - fn list_moves(height: &Vec) -> Vec { [INFO] [stdout] 115 + fn list_moves(height: &[i32]) -> Vec { [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/player/bit_bot_player.rs:127:26 [INFO] [stdout] | [INFO] [stdout] 127 | fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &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] 127 - fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] 127 + fn make_bitboards(board: &[Vec], bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `board` [INFO] [stdout] --> src/player/bit_bot_player.rs:131:18 [INFO] [stdout] | [INFO] [stdout] 131 | for j in 0..7 { [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] 131 - for j in 0..7 { [INFO] [stdout] 131 + for (j, ) in board.iter().enumerate().take(7) { [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/player/bit_bot_player.rs:155:22 [INFO] [stdout] | [INFO] [stdout] 155 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 155 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 155 + fn undo_move(height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_player.rs:155:47 [INFO] [stdout] | [INFO] [stdout] 155 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 155 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 155 + fn undo_move(height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_player.rs:155:69 [INFO] [stdout] | [INFO] [stdout] 155 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 155 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 155 + fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], mut counter: usize) { [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/player/bit_bot_player.rs:164:34 [INFO] [stdout] | [INFO] [stdout] 164 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 164 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 164 + fn make_move(col: usize, height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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/player/bit_bot_player.rs:164:59 [INFO] [stdout] | [INFO] [stdout] 164 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 164 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 164 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, counter: usize) { [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/player/bit_bot_player.rs:164:81 [INFO] [stdout] | [INFO] [stdout] 164 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 164 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 164 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], counter: usize) { [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/player/bit_bot_player.rs:173:42 [INFO] [stdout] | [INFO] [stdout] 173 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 173 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 173 + fn make_initial_move(col: usize, height: &mut [i32], bitboard: &mut Vec, player: usize) { [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/player/bit_bot_player.rs:173:67 [INFO] [stdout] | [INFO] [stdout] 173 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 173 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 173 + fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut [i64], player: usize) { [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/player/bit_bot_player.rs:180:16 [INFO] [stdout] | [INFO] [stdout] 180 | fn flip(board: &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] 180 - fn flip(board: &Vec>) -> Vec> { [INFO] [stdout] 180 + fn flip(board: &[Vec]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bit_bot_player.rs:184:18 [INFO] [stdout] | [INFO] [stdout] 184 | for j in 0..7 { [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] 184 - for j in 0..7 { [INFO] [stdout] 184 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bit_bot_player.rs:185:31 [INFO] [stdout] | [INFO] [stdout] 185 | new_board[i].push(board[i][j]*-1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-board[i][j]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bit_bot_player.rs:192:31 [INFO] [stdout] | [INFO] [stdout] 192 | fn _print_bitboards(bitboard: &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] 192 - fn _print_bitboards(bitboard: &Vec) { [INFO] [stdout] 192 + fn _print_bitboards(bitboard: &[i64]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bitboard` [INFO] [stdout] --> src/player/bit_bot_player.rs:193:14 [INFO] [stdout] | [INFO] [stdout] 193 | for i in 0..2 { [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] 193 - for i in 0..2 { [INFO] [stdout] 193 + for in bitboard.iter().take(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_player.rs:242:9 [INFO] [stdout] | [INFO] [stdout] 242 | return vec![0, 7, 14, 21, 28, 35, 42]; [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] 242 - return vec![0, 7, 14, 21, 28, 35, 42]; [INFO] [stdout] 242 + vec![0, 7, 14, 21, 28, 35, 42] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:304:24 [INFO] [stdout] | [INFO] [stdout] 304 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 304 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 304 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:319:24 [INFO] [stdout] | [INFO] [stdout] 319 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 319 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 319 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:334:24 [INFO] [stdout] | [INFO] [stdout] 334 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 334 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 334 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:358:24 [INFO] [stdout] | [INFO] [stdout] 358 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 358 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 358 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:389:24 [INFO] [stdout] | [INFO] [stdout] 389 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 389 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 389 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:413:24 [INFO] [stdout] | [INFO] [stdout] 413 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 413 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 413 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:442:24 [INFO] [stdout] | [INFO] [stdout] 442 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 442 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 442 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:465:24 [INFO] [stdout] | [INFO] [stdout] 465 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 465 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 465 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:490:24 [INFO] [stdout] | [INFO] [stdout] 490 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 490 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 490 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:524:24 [INFO] [stdout] | [INFO] [stdout] 524 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 524 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 524 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:580:24 [INFO] [stdout] | [INFO] [stdout] 580 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 580 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 580 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:595:24 [INFO] [stdout] | [INFO] [stdout] 595 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 595 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 595 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:610:24 [INFO] [stdout] | [INFO] [stdout] 610 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 610 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 610 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:625:24 [INFO] [stdout] | [INFO] [stdout] 625 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 625 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 625 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_player.rs:638:24 [INFO] [stdout] | [INFO] [stdout] 638 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 638 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 638 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:22:5 [INFO] [stdout] | [INFO] [stdout] 22 | return m; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 22 - return m; [INFO] [stdout] 22 + m [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | for lm in list_moves(&height) { [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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/player/bit_bot_loop_player.rs:69:33 [INFO] [stdout] | [INFO] [stdout] 69 | queue[counter] = list_moves(&height); [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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: length comparison to zero [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:75:12 [INFO] [stdout] | [INFO] [stdout] 75 | if queue[counter].len() > 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: using `!is_empty` is clearer and more explicit: `!queue[counter].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] = note: `#[warn(clippy::len_zero)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:90:45 [INFO] [stdout] | [INFO] [stdout] 90 | queue[counter] = list_moves(&height); [INFO] [stdout] | ^^^^^^^ help: change this to: `height` [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: length comparison to zero [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:91:20 [INFO] [stdout] | [INFO] [stdout] 91 | if queue[counter].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `queue[counter].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/player/bit_bot_loop_player.rs:108:12 [INFO] [stdout] | [INFO] [stdout] 108 | if queue[counter].len() == 0 { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `queue[counter].is_empty()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:138:23 [INFO] [stdout] | [INFO] [stdout] 138 | fn calc_win(bitboard: &Vec, counter: 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] 138 - fn calc_win(bitboard: &Vec, counter: usize) -> bool { [INFO] [stdout] 138 + fn calc_win(bitboard: &[i64], counter: usize) -> bool { [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/player/bit_bot_loop_player.rs:146:23 [INFO] [stdout] | [INFO] [stdout] 146 | fn list_moves(height: &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] 146 - fn list_moves(height: &Vec) -> Vec { [INFO] [stdout] 146 + fn list_moves(height: &[i32]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is used to index `height` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:149:14 [INFO] [stdout] | [INFO] [stdout] 149 | for i in 0..7 { [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] 149 - for i in 0..7 { [INFO] [stdout] 149 + for (i, ) in height.iter().enumerate().take(7) { [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/player/bit_bot_loop_player.rs:158:26 [INFO] [stdout] | [INFO] [stdout] 158 | fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &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] 158 - fn make_bitboards(board: &Vec>, bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] 158 + fn make_bitboards(board: &[Vec], bitboard: &mut Vec, height: &mut Vec) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is used to index `board` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:162:18 [INFO] [stdout] | [INFO] [stdout] 162 | for j in 0..7 { [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] 162 - for j in 0..7 { [INFO] [stdout] 162 + for (j, ) in board.iter().enumerate().take(7) { [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/player/bit_bot_loop_player.rs:186:22 [INFO] [stdout] | [INFO] [stdout] 186 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 186 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 186 + fn undo_move(height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_loop_player.rs:186:47 [INFO] [stdout] | [INFO] [stdout] 186 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 186 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 186 + fn undo_move(height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, mut counter: usize) { [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/player/bit_bot_loop_player.rs:186:69 [INFO] [stdout] | [INFO] [stdout] 186 | fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [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] 186 - fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, mut counter: usize) { [INFO] [stdout] 186 + fn undo_move(height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], mut counter: usize) { [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/player/bit_bot_loop_player.rs:195:34 [INFO] [stdout] | [INFO] [stdout] 195 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 195 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 195 + fn make_move(col: usize, height: &mut [i32], bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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/player/bit_bot_loop_player.rs:195:59 [INFO] [stdout] | [INFO] [stdout] 195 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 195 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 195 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut [i64], moves: &mut Vec, counter: usize) { [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/player/bit_bot_loop_player.rs:195:81 [INFO] [stdout] | [INFO] [stdout] 195 | fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [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] 195 - fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut Vec, counter: usize) { [INFO] [stdout] 195 + fn make_move(col: usize, height: &mut Vec, bitboard: &mut Vec, moves: &mut [i32], counter: usize) { [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/player/bit_bot_loop_player.rs:204:42 [INFO] [stdout] | [INFO] [stdout] 204 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 204 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 204 + fn make_initial_move(col: usize, height: &mut [i32], bitboard: &mut Vec, player: usize) { [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/player/bit_bot_loop_player.rs:204:67 [INFO] [stdout] | [INFO] [stdout] 204 | fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [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] 204 - fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut Vec, player: usize) { [INFO] [stdout] 204 + fn make_initial_move(col: usize, height: &mut Vec, bitboard: &mut [i64], player: usize) { [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/player/bit_bot_loop_player.rs:211:16 [INFO] [stdout] | [INFO] [stdout] 211 | fn flip(board: &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] 211 - fn flip(board: &Vec>) -> Vec> { [INFO] [stdout] 211 + fn flip(board: &[Vec]) -> Vec> { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:215:18 [INFO] [stdout] | [INFO] [stdout] 215 | for j in 0..7 { [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] 215 - for j in 0..7 { [INFO] [stdout] 215 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this multiplication by -1 can be written more succinctly [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:216:31 [INFO] [stdout] | [INFO] [stdout] 216 | new_board[i].push(board[i][j]*-1); [INFO] [stdout] | ^^^^^^^^^^^^^^ help: consider using: `-board[i][j]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#neg_multiply [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&Vec` instead of `&[_]` involves a new object where a slice will do [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:223:31 [INFO] [stdout] | [INFO] [stdout] 223 | fn _print_bitboards(bitboard: &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] 223 - fn _print_bitboards(bitboard: &Vec) { [INFO] [stdout] 223 + fn _print_bitboards(bitboard: &[i64]) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the loop variable `i` is only used to index `bitboard` [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:224:14 [INFO] [stdout] | [INFO] [stdout] 224 | for i in 0..2 { [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] 224 - for i in 0..2 { [INFO] [stdout] 224 + for in bitboard.iter().take(2) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:273:9 [INFO] [stdout] | [INFO] [stdout] 273 | return vec![0, 7, 14, 21, 28, 35, 42]; [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] 273 - return vec![0, 7, 14, 21, 28, 35, 42]; [INFO] [stdout] 273 + vec![0, 7, 14, 21, 28, 35, 42] [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:335:24 [INFO] [stdout] | [INFO] [stdout] 335 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 335 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 335 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:350:24 [INFO] [stdout] | [INFO] [stdout] 350 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 350 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 350 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:365:24 [INFO] [stdout] | [INFO] [stdout] 365 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 365 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 365 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:389:24 [INFO] [stdout] | [INFO] [stdout] 389 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 389 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 389 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:420:24 [INFO] [stdout] | [INFO] [stdout] 420 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 420 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 420 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:444:24 [INFO] [stdout] | [INFO] [stdout] 444 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 444 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 444 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:473:24 [INFO] [stdout] | [INFO] [stdout] 473 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 473 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 473 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:496:24 [INFO] [stdout] | [INFO] [stdout] 496 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 496 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 496 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:521:24 [INFO] [stdout] | [INFO] [stdout] 521 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 521 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 521 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:555:24 [INFO] [stdout] | [INFO] [stdout] 555 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 555 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 555 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:611:24 [INFO] [stdout] | [INFO] [stdout] 611 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 611 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 611 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:626:24 [INFO] [stdout] | [INFO] [stdout] 626 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 626 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 626 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:641:24 [INFO] [stdout] | [INFO] [stdout] 641 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 641 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 641 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:656:24 [INFO] [stdout] | [INFO] [stdout] 656 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 656 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 656 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the function `make_bitboards` doesn't need a mutable reference [INFO] [stdout] --> src/player/bit_bot_loop_player.rs:669:24 [INFO] [stdout] | [INFO] [stdout] 669 | make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed [INFO] [stdout] help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] 669 - make_bitboards(&mut board, &mut bitboards, &mut height); [INFO] [stdout] 669 + make_bitboards(&board, &mut bitboards, &mut height); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player/human_player_ui.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | return potential_move; [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] 8 - return potential_move; [INFO] [stdout] 8 + potential_move [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/player/human_player_ui.rs:12:27 [INFO] [stdout] | [INFO] [stdout] 12 | fn get_legal_moves(board: &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] 12 - fn get_legal_moves(board: &Vec>) -> Vec { [INFO] [stdout] 12 + fn get_legal_moves(board: &[Vec]) -> Vec { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:29:18 [INFO] [stdout] | [INFO] [stdout] 29 | 5 => return human_player_ui::get_move(&board, potential_move), [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 - 5 => return human_player_ui::get_move(&board, potential_move), [INFO] [stdout] 29 + 5 => human_player_ui::get_move(&board, potential_move), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:30:18 [INFO] [stdout] | [INFO] [stdout] 30 | 4 => return human_player::get_move(&board), [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] 30 - 4 => return human_player::get_move(&board), [INFO] [stdout] 30 + 4 => human_player::get_move(&board), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:31:18 [INFO] [stdout] | [INFO] [stdout] 31 | 3 => return bit_bot_player::get_move(&board, self.player), [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] 31 - 3 => return bit_bot_player::get_move(&board, self.player), [INFO] [stdout] 31 + 3 => bit_bot_player::get_move(&board, self.player), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:32:18 [INFO] [stdout] | [INFO] [stdout] 32 | 2 => return bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 32 - 2 => return bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] 32 + 2 => bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:33:18 [INFO] [stdout] | [INFO] [stdout] 33 | 1 => return bot_player::get_move(&board, self.player), [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] 33 - 1 => return bot_player::get_move(&board, self.player), [INFO] [stdout] 33 + 1 => bot_player::get_move(&board, self.player), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/player.rs:34:18 [INFO] [stdout] | [INFO] [stdout] 34 | _ => return random_player::get_move(&board), [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] 34 - _ => return random_player::get_move(&board), [INFO] [stdout] 34 + _ => random_player::get_move(&board), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/player.rs:29:51 [INFO] [stdout] | [INFO] [stdout] 29 | 5 => return human_player_ui::get_move(&board, potential_move), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:30:48 [INFO] [stdout] | [INFO] [stdout] 30 | 4 => return human_player::get_move(&board), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:31:50 [INFO] [stdout] | [INFO] [stdout] 31 | 3 => return bit_bot_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:32:55 [INFO] [stdout] | [INFO] [stdout] 32 | 2 => return bit_bot_loop_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:33:46 [INFO] [stdout] | [INFO] [stdout] 33 | 1 => return bot_player::get_move(&board, self.player), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/player.rs:34:49 [INFO] [stdout] | [INFO] [stdout] 34 | _ => return random_player::get_move(&board), [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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: manual `!RangeInclusive::contains` implementation [INFO] [stdout] --> src/player.rs:54:8 [INFO] [stdout] | [INFO] [stdout] 54 | if m < 0 || m > 4 { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use: `!(0..=4).contains(&m)` [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: usage of an `Arc` that is not `Send` and `Sync` [INFO] [stdout] --> src/ui.rs:11:14 [INFO] [stdout] | [INFO] [stdout] 11 | let ui = Arc::new(AppWindow::new()?); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Arc` is not `Send` and `Sync` as `AppWindow` is neither `Send` nor `Sync` [INFO] [stdout] = help: if the `Arc` will not be used across threads replace it with an `Rc` [INFO] [stdout] = help: otherwise make `AppWindow` `Send` and `Sync` or consider a wrapper type such as `Mutex` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync [INFO] [stdout] = note: `#[warn(clippy::arc_with_non_send_sync)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you are needlessly cloning iterator elements [INFO] [stdout] --> src/ui.rs:69:44 [INFO] [stdout] | [INFO] [stdout] 69 | let old_pieces = ui.get_pieces().iter().map(|p| p.clone()).collect::>(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: remove the `map` call [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_clone [INFO] [stdout] = note: `#[warn(clippy::map_clone)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `slint::ModelRc` [INFO] [stdout] --> src/ui.rs:72:19 [INFO] [stdout] | [INFO] [stdout] 72 | ui.set_pieces(pieces.into()); [INFO] [stdout] | ^^^^^^^^^^^^^ help: consider removing `.into()`: `pieces` [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: the loop variable `j` is only used to index `board` [INFO] [stdout] --> src/ui.rs:82:18 [INFO] [stdout] | [INFO] [stdout] 82 | for j in 0..7 { [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] 82 - for j in 0..7 { [INFO] [stdout] 82 + for in board.iter().take(7) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `slint::ModelRc>` [INFO] [stdout] --> src/ui.rs:100:18 [INFO] [stdout] | [INFO] [stdout] 100 | ui.set_board(mr.into()); [INFO] [stdout] | ^^^^^^^^^ help: consider removing `.into()`: `mr` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/game.rs:89:14 [INFO] [stdout] | [INFO] [stdout] 89 | 1 => return 1, [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] 89 - 1 => return 1, [INFO] [stdout] 89 + 1 => 1, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/game.rs:90:14 [INFO] [stdout] | [INFO] [stdout] 90 | _ => return -1, [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] 90 - _ => return -1, [INFO] [stdout] 90 + _ => -1, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/game.rs:157:36 [INFO] [stdout] | [INFO] [stdout] 157 | let play = player.play(&board, g.potential_move); [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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/game.rs:164:17 [INFO] [stdout] | [INFO] [stdout] 164 | player.play(&board, -1) [INFO] [stdout] | ^^^^^^ help: change this to: `board` [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 assertion is always `false` [INFO] [stdout] --> src/game.rs:319:9 [INFO] [stdout] | [INFO] [stdout] 319 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] = note: `#[warn(clippy::assertions_on_constants)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/game.rs:343:9 [INFO] [stdout] | [INFO] [stdout] 343 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this assertion is always `false` [INFO] [stdout] --> src/game.rs:367:9 [INFO] [stdout] | [INFO] [stdout] 367 | assert!(false); [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: replace this with `panic!()` or `unreachable!()` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assertions_on_constants [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/player/bot_player.rs:94:19 [INFO] [stdout] | [INFO] [stdout] 94 | let mut con = vec![1,1,1,1]; [INFO] [stdout] | ^^^^^^^^^^^^^ help: you can use an array directly: `[1,1,1,1]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/player/bit_bot_player.rs:118:14 [INFO] [stdout] | [INFO] [stdout] 118 | for i in vec![3,2,4,1,5,0,6] { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[3,2,4,1,5,0,6]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:8:17 [INFO] [stdout] | [INFO] [stdout] 8 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin] struct InnerButton_root_16 { [INFO] [stdout] | ^----------------- ------------------- `InnerButton_root_16` is not local [INFO] [stdout] | | [INFO] [stdout] | `Unpin` is not local [INFO] [stdout] | move the `impl` block outside of this associated constant `FIELD_OFFSETS` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` may come from an old version of the `const_field_offset_macro` crate, try updating your dependency with `cargo update -p const_field_offset_macro` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: `#[warn(non_local_definitions)]` on by default [INFO] [stdout] = note: this warning originates in the derive macro `sp::FieldOffsets` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:209:17 [INFO] [stdout] | [INFO] [stdout] 209 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] pub struct InnerAppWindow { [INFO] [stdout] | ^----------------- -------------- `InnerAppWindow` is not local [INFO] [stdout] | | [INFO] [stdout] | `Unpin` is not local [INFO] [stdout] | move the `impl` block outside of this associated constant `FIELD_OFFSETS` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` may come from an old version of the `const_field_offset_macro` crate, try updating your dependency with `cargo update -p const_field_offset_macro` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `sp::FieldOffsets` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:1872:17 [INFO] [stdout] | [INFO] [stdout] 1872 | ...e (sp :: FieldOffsets , Default)] # [const_field_offset (sp :: const_field_offset)] # [repr (C)] # [pin_drop] struct InnerComponent_rectangle_12 { [INFO] [stdout] | ^----------------- --------------------------- `InnerComponent_rectangle_12` is not local [INFO] [stdout] | | [INFO] [stdout] | `Unpin` is not local [INFO] [stdout] | move the `impl` block outside of this associated constant `FIELD_OFFSETS` [INFO] [stdout] | [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the derive macro `sp::FieldOffsets` may come from an old version of the `const_field_offset_macro` crate, try updating your dependency with `cargo update -p const_field_offset_macro` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the derive macro `sp::FieldOffsets` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:2090:14 [INFO] [stdout] | [INFO] [stdout] 2088 | fn drop (self : core :: pin :: Pin < & mut InnerComponent_rectangle_12 >) { [INFO] [stdout] | ------------------------------------------------------------------------- move the `impl` block outside of this method `drop` [INFO] [stdout] 2089 | use slint :: private_unstable_api :: re_exports :: * ; [INFO] [stdout] 2090 | ItemTreeVTable_static ! (static VT for self :: InnerComponent_rectangle_12) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-----------------------------------^ [INFO] [stdout] | | | [INFO] [stdout] | | `InnerComponent_rectangle_12` is not local [INFO] [stdout] | `HasStaticVTable` is not local [INFO] [stdout] | `ItemTreeVTable` is not local [INFO] [stdout] | [INFO] [stdout] = note: the macro `ItemTreeVTable_static` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the macro `ItemTreeVTable_static` may come from an old version of the `i_slint_core` crate, try updating your dependency with `cargo update -p i_slint_core` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the macro `ItemTreeVTable_static` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: non-local `impl` definition, `impl` blocks should be written at the same level as their item [INFO] [stdout] --> /opt/rustwide/target/debug/build/connect-4-75b4f99824acac47/out/appwindow.rs:2294:14 [INFO] [stdout] | [INFO] [stdout] 2292 | fn drop (self : core :: pin :: Pin < & mut InnerAppWindow >) { [INFO] [stdout] | ------------------------------------------------------------ move the `impl` block outside of this method `drop` [INFO] [stdout] 2293 | use slint :: private_unstable_api :: re_exports :: * ; [INFO] [stdout] 2294 | ItemTreeVTable_static ! (static VT for self :: InnerAppWindow) ; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^----------------------^ [INFO] [stdout] | | | [INFO] [stdout] | | `InnerAppWindow` is not local [INFO] [stdout] | `HasStaticVTable` is not local [INFO] [stdout] | `ItemTreeVTable` is not local [INFO] [stdout] | [INFO] [stdout] = note: the macro `ItemTreeVTable_static` defines the non-local `impl`, and may need to be changed [INFO] [stdout] = note: the macro `ItemTreeVTable_static` may come from an old version of the `i_slint_core` crate, try updating your dependency with `cargo update -p i_slint_core` [INFO] [stdout] = note: an `impl` is never scoped, even when it is nested inside an item, as it may impact type checking outside of that item, which can be the case if neither the trait or the self type are at the same nesting level as the `impl` [INFO] [stdout] = note: this warning originates in the macro `ItemTreeVTable_static` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 2m 17s [INFO] running `Command { std: "docker" "inspect" "0eda7abc683aa5c177d21a9487e5ea9ed15fd2bdf058e2cf4fd54bbed2b980d2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0eda7abc683aa5c177d21a9487e5ea9ed15fd2bdf058e2cf4fd54bbed2b980d2", kill_on_drop: false }` [INFO] [stdout] 0eda7abc683aa5c177d21a9487e5ea9ed15fd2bdf058e2cf4fd54bbed2b980d2