[INFO] crate connectr 1.0.0 is already in cache [INFO] extracting crate connectr 1.0.0 into work/ex/clippy-test-run/sources/stable/reg/connectr/1.0.0 [INFO] extracting crate connectr 1.0.0 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/connectr/1.0.0 [INFO] validating manifest of connectr-1.0.0 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of connectr-1.0.0 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing connectr-1.0.0 [INFO] finished frobbing connectr-1.0.0 [INFO] frobbed toml for connectr-1.0.0 written to work/ex/clippy-test-run/sources/stable/reg/connectr/1.0.0/Cargo.toml [INFO] started frobbing connectr-1.0.0 [INFO] finished frobbing connectr-1.0.0 [INFO] frobbed toml for connectr-1.0.0 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/connectr/1.0.0/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting connectr-1.0.0 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/connectr/1.0.0:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] f66114164401449c0b954b6e070037b0c01fb6bb50de3e3f4c0105ed216fcee6 [INFO] running `"docker" "start" "-a" "f66114164401449c0b954b6e070037b0c01fb6bb50de3e3f4c0105ed216fcee6"` [INFO] [stderr] Compiling wrapped-vec v0.2.1 [INFO] [stderr] Checking timer v0.2.0 [INFO] [stderr] Checking tokio-reactor v0.1.8 [INFO] [stderr] Checking tokio-threadpool v0.1.11 [INFO] [stderr] Checking tokio-tcp v0.1.3 [INFO] [stderr] Checking tokio-uds v0.2.5 [INFO] [stderr] Checking tokio-udp v0.1.3 [INFO] [stderr] Checking tokio-fs v0.1.5 [INFO] [stderr] Checking tokio v0.1.15 [INFO] [stderr] Checking tokio-core v0.1.17 [INFO] [stderr] Checking tokio-proto v0.1.1 [INFO] [stderr] Checking tokio-tls v0.1.4 [INFO] [stderr] Checking hyper v0.11.27 [INFO] [stderr] Checking hyper-tls v0.1.4 [INFO] [stderr] Checking reqwest v0.7.3 [INFO] [stderr] Checking rustfm-scrobble v0.9.1 [INFO] [stderr] Checking connectr v1.0.0 (/opt/crater/workdir) [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/http/mod.rs:58:17 [INFO] [stderr] | [INFO] [stderr] 58 | let _ = write!(f, "Code: {}\n", code); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:554:13 [INFO] [stderr] | [INFO] [stderr] 554 | key: key, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `key` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:555:13 [INFO] [stderr] | [INFO] [stderr] 555 | secret: secret, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `secret` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:556:13 [INFO] [stderr] | [INFO] [stderr] 556 | session_key: session_key, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `session_key` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:557:13 [INFO] [stderr] | [INFO] [stderr] 557 | username: username, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `username` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:563:83 [INFO] [stderr] | [INFO] [stderr] 563 | Some(Settings { secret: secret.to_string(), client_id: client_id.to_string(), port: port, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:564:67 [INFO] [stderr] | [INFO] [stderr] 564 | access_token: access, refresh_token: refresh, expire_utc: expire_utc, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `expire_utc` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:565:21 [INFO] [stderr] | [INFO] [stderr] 565 | presets: presets, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `presets` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:567:21 [INFO] [stderr] | [INFO] [stderr] 567 | quicksave: quicksave, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `quicksave` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:568:21 [INFO] [stderr] | [INFO] [stderr] 568 | alarms: alarms, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `alarms` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:569:21 [INFO] [stderr] | [INFO] [stderr] 569 | lastfm_enabled: lastfm_enabled, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lastfm_enabled` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:570:21 [INFO] [stderr] | [INFO] [stderr] 570 | lastfm: lastfm, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `lastfm` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/webapi/mod.rs:75:21 [INFO] [stderr] | [INFO] [stderr] 75 | let _ = write!(f, "{}\n", dev); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/webapi/mod.rs:176:20 [INFO] [stderr] | [INFO] [stderr] 176 | "unknown", "unknown", [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/webapi/mod.rs:176:31 [INFO] [stderr] | [INFO] [stderr] 176 | "unknown", "unknown", [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/webapi/mod.rs:177:30 [INFO] [stderr] | [INFO] [stderr] 177 | position, 0, 0) [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:475:13 [INFO] [stderr] | [INFO] [stderr] 475 | settings: settings, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `settings` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:665:13 [INFO] [stderr] | [INFO] [stderr] 665 | entry: entry, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `entry` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:666:13 [INFO] [stderr] | [INFO] [stderr] 666 | timer: timer, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `timer` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:670:13 [INFO] [stderr] | [INFO] [stderr] 670 | id: id, [INFO] [stderr] | ^^^^^^ help: replace it with: `id` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:936:78 [INFO] [stderr] | [INFO] [stderr] 936 | let body = serde_json::to_string(&DeviceIdList {device_ids: devices, play: play}).unwrap(); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `play` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:940:91 [INFO] [stderr] | [INFO] [stderr] 940 | let body = serde_json::to_string(&DeviceIdList {device_ids: vec![device.clone()], play: play}).unwrap(); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `play` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/http/mod.rs:58:17 [INFO] [stderr] | [INFO] [stderr] 58 | let _ = write!(f, "Code: {}\n", code); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_with_newline)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:554:13 [INFO] [stderr] | [INFO] [stderr] 554 | key: key, [INFO] [stderr] | ^^^^^^^^ help: replace it with: `key` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:555:13 [INFO] [stderr] | [INFO] [stderr] 555 | secret: secret, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `secret` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:556:13 [INFO] [stderr] | [INFO] [stderr] 556 | session_key: session_key, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `session_key` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:557:13 [INFO] [stderr] | [INFO] [stderr] 557 | username: username, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `username` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:563:83 [INFO] [stderr] | [INFO] [stderr] 563 | Some(Settings { secret: secret.to_string(), client_id: client_id.to_string(), port: port, [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `port` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:564:67 [INFO] [stderr] | [INFO] [stderr] 564 | access_token: access, refresh_token: refresh, expire_utc: expire_utc, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `expire_utc` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:565:21 [INFO] [stderr] | [INFO] [stderr] 565 | presets: presets, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `presets` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:567:21 [INFO] [stderr] | [INFO] [stderr] 567 | quicksave: quicksave, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `quicksave` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:568:21 [INFO] [stderr] | [INFO] [stderr] 568 | alarms: alarms, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `alarms` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:569:21 [INFO] [stderr] | [INFO] [stderr] 569 | lastfm_enabled: lastfm_enabled, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `lastfm_enabled` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/settings/mod.rs:570:21 [INFO] [stderr] | [INFO] [stderr] 570 | lastfm: lastfm, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `lastfm` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/test.rs:206:13 [INFO] [stderr] | [INFO] [stderr] 206 | repeat: repeat, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `repeat` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: using `write!()` with a format string that ends in a single newline, consider using `writeln!()` instead [INFO] [stderr] --> src/webapi/mod.rs:75:21 [INFO] [stderr] | [INFO] [stderr] 75 | let _ = write!(f, "{}\n", dev); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/webapi/mod.rs:176:20 [INFO] [stderr] | [INFO] [stderr] 176 | "unknown", "unknown", [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::write_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/webapi/mod.rs:176:31 [INFO] [stderr] | [INFO] [stderr] 176 | "unknown", "unknown", [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stderr] [INFO] [stderr] warning: literal with an empty format string [INFO] [stderr] --> src/webapi/mod.rs:177:30 [INFO] [stderr] | [INFO] [stderr] 177 | position, 0, 0) [INFO] [stderr] | ^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_literal [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:475:13 [INFO] [stderr] | [INFO] [stderr] 475 | settings: settings, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `settings` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:665:13 [INFO] [stderr] | [INFO] [stderr] 665 | entry: entry, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `entry` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:666:13 [INFO] [stderr] | [INFO] [stderr] 666 | timer: timer, [INFO] [stderr] | ^^^^^^^^^^^^ help: replace it with: `timer` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:670:13 [INFO] [stderr] | [INFO] [stderr] 670 | id: id, [INFO] [stderr] | ^^^^^^ help: replace it with: `id` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:936:78 [INFO] [stderr] | [INFO] [stderr] 936 | let body = serde_json::to_string(&DeviceIdList {device_ids: devices, play: play}).unwrap(); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `play` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/webapi/mod.rs:940:91 [INFO] [stderr] | [INFO] [stderr] 940 | let body = serde_json::to_string(&DeviceIdList {device_ids: vec![device.clone()], play: play}).unwrap(); [INFO] [stderr] | ^^^^^^^^^^ help: replace it with: `play` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/http/mod.rs:83:21 [INFO] [stderr] | [INFO] [stderr] 83 | enc_query [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/http/mod.rs:82:37 [INFO] [stderr] | [INFO] [stderr] 82 | let enc_query = percent_encoding::utf8_percent_encode(&q, percent_encoding::QUERY_ENCODE_SET).collect::(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/http/mod.rs:182:5 [INFO] [stderr] | [INFO] [stderr] 182 | auth_code [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/http/mod.rs:181:21 [INFO] [stderr] | [INFO] [stderr] 181 | let auth_code = spotify_auth_code(auth_lines); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/settings/mod.rs:17:17 [INFO] [stderr] | [INFO] [stderr] 17 | const INIFILE: &'static str = "connectr.ini"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: unneeded return statement [INFO] [stderr] --> src/webapi/test.rs:204:9 [INFO] [stderr] | [INFO] [stderr] 204 | / return AlarmEntry { [INFO] [stderr] 205 | | time: time.to_string(), [INFO] [stderr] 206 | | repeat: repeat, [INFO] [stderr] 207 | | context: PlayContext::new().build(), [INFO] [stderr] 208 | | device: "12345".to_string(), [INFO] [stderr] 209 | | now: Some(now), [INFO] [stderr] 210 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_return)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stderr] help: remove `return` as shown [INFO] [stderr] | [INFO] [stderr] 204 | AlarmEntry { [INFO] [stderr] 205 | time: time.to_string(), [INFO] [stderr] 206 | repeat: repeat, [INFO] [stderr] 207 | context: PlayContext::new().build(), [INFO] [stderr] 208 | device: "12345".to_string(), [INFO] [stderr] 209 | now: Some(now), [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: this is a decimal constant [INFO] [stderr] --> src/webapi/test.rs:223:37 [INFO] [stderr] | [INFO] [stderr] 223 | let today = Local.ymd(2017, 06, 16).and_hms_milli(9, 00, 00, 0); [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::zero_prefixed_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stderr] help: if you mean to use a decimal constant, remove the `0` to remove confusion [INFO] [stderr] | [INFO] [stderr] 223 | let today = Local.ymd(2017, 6, 16).and_hms_milli(9, 00, 00, 0); [INFO] [stderr] | ^ [INFO] [stderr] help: if you mean to use an octal constant, use `0o` [INFO] [stderr] | [INFO] [stderr] 223 | let today = Local.ymd(2017, 0o6, 16).and_hms_milli(9, 00, 00, 0); [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: this is a decimal constant [INFO] [stderr] --> src/webapi/test.rs:246:37 [INFO] [stderr] | [INFO] [stderr] 246 | let today = Local.ymd(2017, 06, 21).and_hms_milli(21, 00, 00, 0); [INFO] [stderr] | ^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal [INFO] [stderr] help: if you mean to use a decimal constant, remove the `0` to remove confusion [INFO] [stderr] | [INFO] [stderr] 246 | let today = Local.ymd(2017, 6, 21).and_hms_milli(21, 00, 00, 0); [INFO] [stderr] | ^ [INFO] [stderr] help: if you mean to use an octal constant, use `0o` [INFO] [stderr] | [INFO] [stderr] 246 | let today = Local.ymd(2017, 0o6, 21).and_hms_milli(21, 00, 00, 0); [INFO] [stderr] | ^^^ [INFO] [stderr] [INFO] [stderr] warning: unneeded `()` [INFO] [stderr] --> src/webapi/mod.rs:758:20 [INFO] [stderr] | [INFO] [stderr] 758 | return () [INFO] [stderr] | ^^ help: remove the `()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded `()` [INFO] [stderr] --> src/webapi/mod.rs:803:20 [INFO] [stderr] | [INFO] [stderr] 803 | return () [INFO] [stderr] | ^^ help: remove the `()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/settings/mod.rs:62:23 [INFO] [stderr] | [INFO] [stderr] 62 | format!("{}/.{}", env::home_dir().unwrap().display(), INIFILE) [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/settings/mod.rs:67:34 [INFO] [stderr] | [INFO] [stderr] 67 | let path = format!("{}/.{}", env::home_dir().unwrap().display(), INIFILE); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/lib.rs:158:24 [INFO] [stderr] | [INFO] [stderr] 158 | if let Some(dir) = std::env::home_dir() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/http/mod.rs:83:21 [INFO] [stderr] | [INFO] [stderr] 83 | enc_query [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/http/mod.rs:82:37 [INFO] [stderr] | [INFO] [stderr] 82 | let enc_query = percent_encoding::utf8_percent_encode(&q, percent_encoding::QUERY_ENCODE_SET).collect::(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/http/mod.rs:182:5 [INFO] [stderr] | [INFO] [stderr] 182 | auth_code [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/http/mod.rs:181:21 [INFO] [stderr] | [INFO] [stderr] 181 | let auth_code = spotify_auth_code(auth_lines); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: Constants have by default a `'static` lifetime [INFO] [stderr] --> src/settings/mod.rs:17:17 [INFO] [stderr] | [INFO] [stderr] 17 | const INIFILE: &'static str = "connectr.ini"; [INFO] [stderr] | -^^^^^^^---- help: consider removing `'static`: `&str` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::const_static_lifetime)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#const_static_lifetime [INFO] [stderr] [INFO] [stderr] warning: unneeded `()` [INFO] [stderr] --> src/webapi/mod.rs:758:20 [INFO] [stderr] | [INFO] [stderr] 758 | return () [INFO] [stderr] | ^^ help: remove the `()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unused_unit)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: unneeded `()` [INFO] [stderr] --> src/webapi/mod.rs:803:20 [INFO] [stderr] | [INFO] [stderr] 803 | return () [INFO] [stderr] | ^^ help: remove the `()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_unit [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/settings/mod.rs:62:23 [INFO] [stderr] | [INFO] [stderr] 62 | format!("{}/.{}", env::home_dir().unwrap().display(), INIFILE) [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(deprecated)] on by default [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/settings/mod.rs:67:34 [INFO] [stderr] | [INFO] [stderr] 67 | let path = format!("{}/.{}", env::home_dir().unwrap().display(), INIFILE); [INFO] [stderr] | ^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: use of deprecated item 'std::env::home_dir': This function's behavior is unexpected and probably not what you want. Consider using the home_dir function from https://crates.io/crates/dirs instead. [INFO] [stderr] --> src/lib.rs:158:24 [INFO] [stderr] | [INFO] [stderr] 158 | if let Some(dir) = std::env::home_dir() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/http/mod.rs:86:34 [INFO] [stderr] | [INFO] [stderr] 86 | let header = format!("Content-Type: application/json"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Content-Type: application/json".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/http/mod.rs:146:13 [INFO] [stderr] | [INFO] [stderr] 146 | / match transfer.perform() { [INFO] [stderr] 147 | | Err(x) => { [INFO] [stderr] 148 | | let result: Result = Err(x.description().to_string()); [INFO] [stderr] 149 | | #[cfg(feature = "verbose_http")] [INFO] [stderr] ... | [INFO] [stderr] 153 | | _ => {} [INFO] [stderr] 154 | | }; [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 146 | if let Err(x) = transfer.perform() { [INFO] [stderr] 147 | let result: Result = Err(x.description().to_string()); [INFO] [stderr] 148 | #[cfg(feature = "verbose_http")] [INFO] [stderr] 149 | warn!("HTTP response: err: {}", x.description().to_string()); [INFO] [stderr] 150 | return HttpResponse {code: response, data: result } [INFO] [stderr] 151 | }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/http/mod.rs:186:8 [INFO] [stderr] | [INFO] [stderr] 186 | if !open::that(url).is_ok() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `open::that(url).is_err()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/http/mod.rs:294:8 [INFO] [stderr] | [INFO] [stderr] 294 | if !open::that(format!("http://127.0.0.1:{}", port)).is_ok() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `open::that(format!("http://127.0.0.1:{}", port)).is_err()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/http/mod.rs:86:34 [INFO] [stderr] | [INFO] [stderr] 86 | let header = format!("Content-Type: application/json"); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Content-Type: application/json".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/http/mod.rs:146:13 [INFO] [stderr] | [INFO] [stderr] 146 | / match transfer.perform() { [INFO] [stderr] 147 | | Err(x) => { [INFO] [stderr] 148 | | let result: Result = Err(x.description().to_string()); [INFO] [stderr] 149 | | #[cfg(feature = "verbose_http")] [INFO] [stderr] ... | [INFO] [stderr] 153 | | _ => {} [INFO] [stderr] 154 | | }; [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 146 | if let Err(x) = transfer.perform() { [INFO] [stderr] 147 | let result: Result = Err(x.description().to_string()); [INFO] [stderr] 148 | #[cfg(feature = "verbose_http")] [INFO] [stderr] 149 | warn!("HTTP response: err: {}", x.description().to_string()); [INFO] [stderr] 150 | return HttpResponse {code: response, data: result } [INFO] [stderr] 151 | }; [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/http/mod.rs:272:68 [INFO] [stderr] | [INFO] [stderr] 272 | let mut post_reader = reader.by_ref().take(post_bytes as u64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try: `u64::from(post_bytes)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/http/mod.rs:276:58 [INFO] [stderr] | [INFO] [stderr] 276 | for post_pair in post_data.split("&") { [INFO] [stderr] | ^^^ help: try using a char instead: `'&'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/http/mod.rs:277:61 [INFO] [stderr] | [INFO] [stderr] 277 | let mut key_value = post_pair.split("="); [INFO] [stderr] | ^^^ help: try using a char instead: `'='` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/http/mod.rs:186:8 [INFO] [stderr] | [INFO] [stderr] 186 | if !open::that(url).is_ok() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `open::that(url).is_err()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::nonminimal_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/http/mod.rs:327:13 [INFO] [stderr] | [INFO] [stderr] 327 | auth_code = auth_code + &cap[1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `auth_code += &cap[1]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: this boolean expression can be simplified [INFO] [stderr] --> src/http/mod.rs:294:8 [INFO] [stderr] | [INFO] [stderr] 294 | if !open::that(format!("http://127.0.0.1:{}", port)).is_ok() { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `open::that(format!("http://127.0.0.1:{}", port)).is_err()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stderr] [INFO] [stderr] warning: casting u32 to u64 may become silently lossy if types change [INFO] [stderr] --> src/http/mod.rs:272:68 [INFO] [stderr] | [INFO] [stderr] 272 | let mut post_reader = reader.by_ref().take(post_bytes as u64); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: try: `u64::from(post_bytes)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/http/mod.rs:276:58 [INFO] [stderr] | [INFO] [stderr] 276 | for post_pair in post_data.split("&") { [INFO] [stderr] | ^^^ help: try using a char instead: `'&'` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_char_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/http/mod.rs:277:61 [INFO] [stderr] | [INFO] [stderr] 277 | let mut key_value = post_pair.split("="); [INFO] [stderr] | ^^^ help: try using a char instead: `'='` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/http/mod.rs:327:13 [INFO] [stderr] | [INFO] [stderr] 327 | auth_code = auth_code + &cap[1]; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `auth_code += &cap[1]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::assign_op_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/settings/mod.rs:119:20 [INFO] [stderr] | [INFO] [stderr] 119 | form.push_str(&format!(r###" [INFO] [stderr] | ____________________^ [INFO] [stderr] 120 | |

[INFO] [stderr] 121 | |

Presets (all fields optional):

[INFO] [stderr] 122 | |
[INFO] [stderr] ... | [INFO] [stderr] 135 | | [INFO] [stderr] 136 | | "###)); [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] help: consider using .to_string() [INFO] [stderr] | [INFO] [stderr] 119 | form.push_str(&r###" [INFO] [stderr] 120 |

[INFO] [stderr] 121 |

Presets (all fields optional):

[INFO] [stderr] 122 |
[INFO] [stderr] 123 | Presets let you start your favorite Spotify contexts (playlist, album, artist, etc) from Connectr. [INFO] [stderr] 124 | You can add an optional "quick save" playlist for each preset, to quickly save tracks you like to a known playlist. [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/settings/mod.rs:167:20 [INFO] [stderr] | [INFO] [stderr] 167 | form.push_str(&format!(r###" [INFO] [stderr] | ____________________^ [INFO] [stderr] 168 | |

[INFO] [stderr] 169 | |

Last.fm Scrobbling (optional):

[INFO] [stderr] 170 | |
[INFO] [stderr] ... | [INFO] [stderr] 175 | |
[INFO] [stderr] 176 | | "###)); [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] help: consider using .to_string() [INFO] [stderr] | [INFO] [stderr] 167 | form.push_str(&r###" [INFO] [stderr] 168 |

[INFO] [stderr] 169 |

Last.fm Scrobbling (optional):

[INFO] [stderr] 170 |
[INFO] [stderr] 171 | Enable Scrobbling to Last.fm. If enabled, Connectr will scrobble any tracks that it sees playing on your Spotify account. Note that Connectr must be running and online to scrobble, so this feature is most useful when Connectr is hosted on an always-on server like a home media machine or a VPS.

[INFO] [stderr] 172 | This whole section is optional, but all fields are required if any of them are specified.

[INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:182:24 [INFO] [stderr] | [INFO] [stderr] 182 | Some(_) => match settings.lastfm_enabled { [INFO] [stderr] | ________________________^ [INFO] [stderr] 183 | | false => false, [INFO] [stderr] 184 | | true => true, [INFO] [stderr] 185 | | } [INFO] [stderr] | |_____________^ help: consider using an if/else expression: `if settings.lastfm_enabled { true } else { false }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:200:25 [INFO] [stderr] | [INFO] [stderr] 200 | ignore_pc = match lastfm.ignore_pc { [INFO] [stderr] | _________________________^ [INFO] [stderr] 201 | | false => "", [INFO] [stderr] 202 | | true => "checked", [INFO] [stderr] 203 | | }; [INFO] [stderr] | |_____________^ help: consider using an if/else expression: `if lastfm.ignore_pc { "checked" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:204:28 [INFO] [stderr] | [INFO] [stderr] 204 | ignore_phone = match lastfm.ignore_phone { [INFO] [stderr] | ____________________________^ [INFO] [stderr] 205 | | false => "", [INFO] [stderr] 206 | | true => "checked", [INFO] [stderr] 207 | | }; [INFO] [stderr] | |_____________^ help: consider using an if/else expression: `if lastfm.ignore_phone { "checked" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:210:19 [INFO] [stderr] | [INFO] [stderr] 210 | let enabled = match enabled { [INFO] [stderr] | ___________________^ [INFO] [stderr] 211 | | true => "checked", [INFO] [stderr] 212 | | false => "", [INFO] [stderr] 213 | | }; [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if enabled { "checked" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/settings/mod.rs:248:41 [INFO] [stderr] | [INFO] [stderr] 248 | pub fn request_web_alarm_config(alarms: &Vec, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[AlarmConfig]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/settings/mod.rs:280:20 [INFO] [stderr] | [INFO] [stderr] 280 | form.push_str(&format!( [INFO] [stderr] | ____________________^ [INFO] [stderr] 281 | | r###" [INFO] [stderr] 282 | |
[INFO] [stderr] 283 | |

Alarm Schedule:

[INFO] [stderr] 284 | |
[INFO] [stderr] 285 | | [INFO] [stderr] 286 | | "###)); [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] help: consider using .to_string() [INFO] [stderr] | [INFO] [stderr] 280 | form.push_str(&r###" [INFO] [stderr] 281 |
Time eh?RepeatSpotify URI eh?Device ID eh?

[INFO] [stderr] 282 |

Alarm Schedule:

[INFO] [stderr] 283 | [INFO] [stderr] 284 | [INFO] [stderr] 285 | "###.to_string()); [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:297:13 [INFO] [stderr] | [INFO] [stderr] 297 | / match alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Daily }) { [INFO] [stderr] 298 | | true => "selected", _ => "" }, [INFO] [stderr] | |_____________________________________________^ help: consider using an if/else expression: `if alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Daily }) { "selected" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:299:13 [INFO] [stderr] | [INFO] [stderr] 299 | / match alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekdays}) { [INFO] [stderr] 300 | | true => "selected", _ => ""}, [INFO] [stderr] | |____________________________________________^ help: consider using an if/else expression: `if alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekdays}) { "selected" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | / match alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekends}) { [INFO] [stderr] 302 | | true => "selected", _ => ""}, [INFO] [stderr] | |____________________________________________^ help: consider using an if/else expression: `if alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekends}) { "selected" } else { "" }` [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/settings/mod.rs:119:20 [INFO] [stderr] | [INFO] [stderr] 119 | form.push_str(&format!(r###" [INFO] [stderr] | ____________________^ [INFO] [stderr] 120 | | [INFO] [stderr] 121 | | [INFO] [stderr] 136 | | "###)); [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] help: consider using .to_string() [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] 119 | form.push_str(&r###" [INFO] [stderr] 120 | [INFO] [stderr] 121 | [INFO] [stderr] 169 | | [INFO] [stderr] 169 |
Time eh?RepeatSpotify URI eh?Device ID eh?


Presets (all fields optional):

[INFO] [stderr] 122 | |
[INFO] [stderr] ... | [INFO] [stderr] 135 | |


Presets (all fields optional):

[INFO] [stderr] 122 |
[INFO] [stderr] 123 | Presets let you start your favorite Spotify contexts (playlist, album, artist, etc) from Connectr. [INFO] [stderr] 124 | You can add an optional "quick save" playlist for each preset, to quickly save tracks you like to a known playlist. [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/settings/mod.rs:167:20 [INFO] [stderr] | [INFO] [stderr] 167 | form.push_str(&format!(r###" [INFO] [stderr] | ____________________^ [INFO] [stderr] 168 | |


Last.fm Scrobbling (optional):

[INFO] [stderr] 170 | |
[INFO] [stderr] ... | [INFO] [stderr] 175 | |
[INFO] [stderr] 176 | | "###)); [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] help: consider using .to_string() [INFO] [stderr] | [INFO] [stderr] 167 | form.push_str(&r###" [INFO] [stderr] 168 |


Last.fm Scrobbling (optional):

[INFO] [stderr] 170 |
[INFO] [stderr] 171 | Enable Scrobbling to Last.fm. If enabled, Connectr will scrobble any tracks that it sees playing on your Spotify account. Note that Connectr must be running and online to scrobble, so this feature is most useful when Connectr is hosted on an always-on server like a home media machine or a VPS.

[INFO] [stderr] 172 | This whole section is optional, but all fields are required if any of them are specified.

[INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:182:24 [INFO] [stderr] | [INFO] [stderr] 182 | Some(_) => match settings.lastfm_enabled { [INFO] [stderr] | ________________________^ [INFO] [stderr] 183 | | false => false, [INFO] [stderr] 184 | | true => true, [INFO] [stderr] 185 | | } [INFO] [stderr] | |_____________^ help: consider using an if/else expression: `if settings.lastfm_enabled { true } else { false }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:200:25 [INFO] [stderr] | [INFO] [stderr] 200 | ignore_pc = match lastfm.ignore_pc { [INFO] [stderr] | _________________________^ [INFO] [stderr] 201 | | false => "", [INFO] [stderr] 202 | | true => "checked", [INFO] [stderr] 203 | | }; [INFO] [stderr] | |_____________^ help: consider using an if/else expression: `if lastfm.ignore_pc { "checked" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:204:28 [INFO] [stderr] | [INFO] [stderr] 204 | ignore_phone = match lastfm.ignore_phone { [INFO] [stderr] | ____________________________^ [INFO] [stderr] 205 | | false => "", [INFO] [stderr] 206 | | true => "checked", [INFO] [stderr] 207 | | }; [INFO] [stderr] | |_____________^ help: consider using an if/else expression: `if lastfm.ignore_phone { "checked" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:210:19 [INFO] [stderr] | [INFO] [stderr] 210 | let enabled = match enabled { [INFO] [stderr] | ___________________^ [INFO] [stderr] 211 | | true => "checked", [INFO] [stderr] 212 | | false => "", [INFO] [stderr] 213 | | }; [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if enabled { "checked" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/settings/mod.rs:248:41 [INFO] [stderr] | [INFO] [stderr] 248 | pub fn request_web_alarm_config(alarms: &Vec, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^ help: change this to: `&[AlarmConfig]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::ptr_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:328:52 [INFO] [stderr] | [INFO] [stderr] 328 | Some(_) => Ini::load_from_file(&inifile()).unwrap_or(Ini::new()), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| Ini::new())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:337:42 [INFO] [stderr] | [INFO] [stderr] 337 | let secret = config.remove("secret").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:338:48 [INFO] [stderr] | [INFO] [stderr] 338 | let client_id = config.remove("client_id").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/settings/mod.rs:339:19 [INFO] [stderr] | [INFO] [stderr] 339 | let presets = config.remove("presets").unwrap_or(String::new()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `config.remove("presets").unwrap_or_default()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:349:37 [INFO] [stderr] | [INFO] [stderr] 349 | for preset in presets.split("\n") { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:350:41 [INFO] [stderr] | [INFO] [stderr] 350 | let mut pair = preset.split("="); [INFO] [stderr] | ^^^ help: try using a char instead: `'='` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/settings/mod.rs:358:26 [INFO] [stderr] | [INFO] [stderr] 358 | let lastfm_enabled = match config.remove("lastfm_enabled") { [INFO] [stderr] | __________________________^ [INFO] [stderr] 359 | | Some(_) => true, [INFO] [stderr] 360 | | None => false, [INFO] [stderr] 361 | | }; [INFO] [stderr] | |_____^ help: try this: `config.remove("lastfm_enabled").is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:362:43 [INFO] [stderr] | [INFO] [stderr] 362 | let key = config.remove("lastfm_key").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:363:49 [INFO] [stderr] | [INFO] [stderr] 363 | let secret = config.remove("lastfm_secret").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:364:53 [INFO] [stderr] | [INFO] [stderr] 364 | let username = config.remove("lastfm_username").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:365:53 [INFO] [stderr] | [INFO] [stderr] 365 | let password = config.remove("lastfm_password").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/settings/mod.rs:280:20 [INFO] [stderr] | [INFO] [stderr] 280 | form.push_str(&format!( [INFO] [stderr] | ____________________^ [INFO] [stderr] 281 | | r###" [INFO] [stderr] --> src/settings/mod.rs:376:55 [INFO] [stderr] 282 | |

[INFO] [stderr] | [INFO] [stderr] 376 | let ignore_pc = config.remove("lastfm_ignore_pc").unwrap_or("".to_string()) != ""; [INFO] [stderr] 283 | |

Alarm Schedule:

[INFO] [stderr] 284 | | [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] 285 | | [INFO] [stderr] 286 | | "###)); [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] | [INFO] [stderr] help: consider using .to_string() [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] | [INFO] [stderr] 280 | form.push_str(&r###" [INFO] [stderr] 281 |
Time eh?RepeatSpotify URI eh?Device ID eh?

[INFO] [stderr] 282 |

Alarm Schedule:

[INFO] [stderr] 283 | [INFO] [stderr] 284 | [INFO] [stderr] 285 | "###.to_string()); [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:377:61 [INFO] [stderr] | [INFO] [stderr] 377 | let ignore_phone = config.remove("lastfm_ignore_phone").unwrap_or("".to_string()) != ""; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:297:13 [INFO] [stderr] | [INFO] [stderr] 297 | / match alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Daily }) { [INFO] [stderr] 298 | | true => "selected", _ => "" }, [INFO] [stderr] | |_____________________________________________^ help: consider using an if/else expression: `if alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Daily }) { "selected" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:299:13 [INFO] [stderr] | [INFO] [stderr] 299 | / match alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekdays}) { [INFO] [stderr] 300 | | true => "selected", _ => ""}, [INFO] [stderr] | |____________________________________________^ help: consider using an if/else expression: `if alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekdays}) { "selected" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/settings/mod.rs:301:13 [INFO] [stderr] | [INFO] [stderr] 301 | / match alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekends}) { [INFO] [stderr] 302 | | true => "selected", _ => ""}, [INFO] [stderr] | |____________________________________________^ help: consider using an if/else expression: `if alarms.get(i).map_or(false, |a| {a.repeat == AlarmRepeat::Weekends}) { "selected" } else { "" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise [INFO] [stderr] --> src/settings/mod.rs:426:21 [INFO] [stderr] | [INFO] [stderr] 426 | let entry = entries.get_mut(idx).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `entries[idx]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:427:25 [INFO] [stderr] | [INFO] [stderr] 427 | match key.split("_").next().unwrap() { [INFO] [stderr] | ^^^ help: try using a char instead: `'_'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 28 [INFO] [stderr] --> src/settings/mod.rs:464:1 [INFO] [stderr] | [INFO] [stderr] 464 | / pub fn read_settings(scopes_version: u32) -> Option { [INFO] [stderr] 465 | | info!("Attempting to read config file."); [INFO] [stderr] 466 | | let conf = match Ini::load_from_file(&inifile()) { [INFO] [stderr] 467 | | Ok(c) => c, [INFO] [stderr] ... | [INFO] [stderr] 571 | | }) [INFO] [stderr] 572 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:328:52 [INFO] [stderr] | [INFO] [stderr] 328 | Some(_) => Ini::load_from_file(&inifile()).unwrap_or(Ini::new()), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| Ini::new())` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:337:42 [INFO] [stderr] | [INFO] [stderr] 337 | let secret = config.remove("secret").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:338:48 [INFO] [stderr] | [INFO] [stderr] 338 | let client_id = config.remove("client_id").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/settings/mod.rs:339:19 [INFO] [stderr] | [INFO] [stderr] 339 | let presets = config.remove("presets").unwrap_or(String::new()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `config.remove("presets").unwrap_or_default()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:349:37 [INFO] [stderr] | [INFO] [stderr] 349 | for preset in presets.split("\n") { [INFO] [stderr] | ^^^^ help: try using a char instead: `'\n'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:350:41 [INFO] [stderr] | [INFO] [stderr] 350 | let mut pair = preset.split("="); [INFO] [stderr] | ^^^ help: try using a char instead: `'='` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_some()` [INFO] [stderr] --> src/settings/mod.rs:358:26 [INFO] [stderr] | [INFO] [stderr] 358 | let lastfm_enabled = match config.remove("lastfm_enabled") { [INFO] [stderr] | __________________________^ [INFO] [stderr] 359 | | Some(_) => true, [INFO] [stderr] 360 | | None => false, [INFO] [stderr] 361 | | }; [INFO] [stderr] | |_____^ help: try this: `config.remove("lastfm_enabled").is_some()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern_matching)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:362:43 [INFO] [stderr] | [INFO] [stderr] 362 | let key = config.remove("lastfm_key").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:363:49 [INFO] [stderr] | [INFO] [stderr] 363 | let secret = config.remove("lastfm_secret").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:364:53 [INFO] [stderr] | [INFO] [stderr] 364 | let username = config.remove("lastfm_username").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:365:53 [INFO] [stderr] | [INFO] [stderr] 365 | let password = config.remove("lastfm_password").unwrap_or("".to_string()); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:376:55 [INFO] [stderr] | [INFO] [stderr] 376 | let ignore_pc = config.remove("lastfm_ignore_pc").unwrap_or("".to_string()) != ""; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a function call [INFO] [stderr] --> src/settings/mod.rs:377:61 [INFO] [stderr] | [INFO] [stderr] 377 | let ignore_phone = config.remove("lastfm_ignore_phone").unwrap_or("".to_string()) != ""; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_string())` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: called `.get_mut().unwrap()` on a Vec. Using `[]` is more clear and more concise [INFO] [stderr] --> src/settings/mod.rs:426:21 [INFO] [stderr] | [INFO] [stderr] 426 | let entry = entries.get_mut(idx).unwrap(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `entries[idx]` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::get_unwrap)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#get_unwrap [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:427:25 [INFO] [stderr] | [INFO] [stderr] 427 | match key.split("_").next().unwrap() { [INFO] [stderr] | ^^^ help: try using a char instead: `'_'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: the function has a cyclomatic complexity of 28 [INFO] [stderr] --> src/settings/mod.rs:464:1 [INFO] [stderr] | [INFO] [stderr] 464 | / pub fn read_settings(scopes_version: u32) -> Option { [INFO] [stderr] 465 | | info!("Attempting to read config file."); [INFO] [stderr] 466 | | let conf = match Ini::load_from_file(&inifile()) { [INFO] [stderr] 467 | | Ok(c) => c, [INFO] [stderr] ... | [INFO] [stderr] 571 | | }) [INFO] [stderr] 572 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cyclomatic_complexity)] on by default [INFO] [stderr] = help: you could split it up into multiple smaller functions [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cyclomatic_complexity [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:523:42 [INFO] [stderr] | [INFO] [stderr] 523 | let mut fields = value.split(","); [INFO] [stderr] | ^^^ help: try using a char instead: `','` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you seem to want to iterate on a map's values [INFO] [stderr] --> src/settings/mod.rs:534:30 [INFO] [stderr] | [INFO] [stderr] 534 | for (_key, value) in section { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::for_kv_map)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stderr] help: use the corresponding method [INFO] [stderr] | [INFO] [stderr] 534 | for value in section.values() { [INFO] [stderr] | ^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/settings/mod.rs:535:13 [INFO] [stderr] | [INFO] [stderr] 535 | / match AlarmConfig::from_str(value) { [INFO] [stderr] 536 | | Ok(a) => alarms.push(a), [INFO] [stderr] 537 | | Err(_) => {}, [INFO] [stderr] 538 | | } [INFO] [stderr] | |_____________^ help: try this: `if let Ok(a) = AlarmConfig::from_str(value) { alarms.push(a) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/settings/mod.rs:523:42 [INFO] [stderr] | [INFO] [stderr] 523 | let mut fields = value.split(","); [INFO] [stderr] | ^^^ help: try using a char instead: `','` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you seem to want to iterate on a map's values [INFO] [stderr] --> src/settings/mod.rs:534:30 [INFO] [stderr] | [INFO] [stderr] 534 | for (_key, value) in section { [INFO] [stderr] | ^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::for_kv_map)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stderr] help: use the corresponding method [INFO] [stderr] | [INFO] [stderr] 534 | for value in section.values() { [INFO] [stderr] | ^^^^^ ^^^^^^^^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/settings/mod.rs:535:13 [INFO] [stderr] | [INFO] [stderr] 535 | / match AlarmConfig::from_str(value) { [INFO] [stderr] 536 | | Ok(a) => alarms.push(a), [INFO] [stderr] 537 | | Err(_) => {}, [INFO] [stderr] 538 | | } [INFO] [stderr] | |_____________^ help: try this: `if let Ok(a) = AlarmConfig::from_str(value) { alarms.push(a) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: writing `&Vec<_>` instead of `&[_]` involves one more reference and cannot be used with non-Vec-based slices. [INFO] [stderr] --> src/webapi/test.rs:105:30 [INFO] [stderr] | [INFO] [stderr] 105 | fn token_response(pairs: &Vec>) -> (StatusCode, String) { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: change this to: `&[Vec<&str>]` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/webapi/test.rs:197:9 [INFO] [stderr] | [INFO] [stderr] 197 | / match spotify.refresh_oauth_tokens() { [INFO] [stderr] 198 | | Some(_) => { assert!(false) }, [INFO] [stderr] 199 | | None => { }, [INFO] [stderr] 200 | | } [INFO] [stderr] | |_________^ help: try this: `if let Some(_) = spotify.refresh_oauth_tokens() { assert!(false) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:226:68 [INFO] [stderr] | [INFO] [stderr] 226 | let entry = build_alarm_entry("21:00", AlarmRepeat::Daily, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:231:68 [INFO] [stderr] | [INFO] [stderr] 231 | let entry = build_alarm_entry("08:00", AlarmRepeat::Daily, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:236:71 [INFO] [stderr] | [INFO] [stderr] 236 | let entry = build_alarm_entry("08:00", AlarmRepeat::Weekends, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:241:71 [INFO] [stderr] | [INFO] [stderr] 241 | let entry = build_alarm_entry("08:00", AlarmRepeat::Weekdays, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:249:68 [INFO] [stderr] | [INFO] [stderr] 249 | let entry = build_alarm_entry("23:00", AlarmRepeat::Daily, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:254:68 [INFO] [stderr] | [INFO] [stderr] 254 | let entry = build_alarm_entry("00:00", AlarmRepeat::Daily, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/webapi/mod.rs:86:25 [INFO] [stderr] | [INFO] [stderr] 86 | (&self.devices).into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:259:71 [INFO] [stderr] | [INFO] [stderr] 259 | let entry = build_alarm_entry("08:00", AlarmRepeat::Weekends, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: item `webapi::ConnectDeviceList` has a public `len` method but no corresponding `is_empty` method [INFO] [stderr] --> src/webapi/mod.rs:98:1 [INFO] [stderr] | [INFO] [stderr] 98 | / impl ConnectDeviceList { [INFO] [stderr] 99 | | pub fn len(&self) -> usize { [INFO] [stderr] 100 | | self.devices.len() [INFO] [stderr] 101 | | } [INFO] [stderr] 102 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_without_is_empty)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/test.rs:264:71 [INFO] [stderr] | [INFO] [stderr] 264 | let entry = build_alarm_entry("08:00", AlarmRepeat::Weekdays, today.clone()); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try removing the `clone` call: `today` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: this .into_iter() call is equivalent to .iter() and will not move the Vec [INFO] [stderr] --> src/webapi/mod.rs:86:25 [INFO] [stderr] | [INFO] [stderr] 86 | (&self.devices).into_iter() [INFO] [stderr] | ^^^^^^^^^ help: call directly: `iter` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::into_iter_on_ref)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref [INFO] [stderr] [INFO] [stderr] warning: item `webapi::ConnectDeviceList` has a public `len` method but no corresponding `is_empty` method [INFO] [stderr] --> src/webapi/mod.rs:98:1 [INFO] [stderr] | [INFO] [stderr] 98 | / impl ConnectDeviceList { [INFO] [stderr] 99 | | pub fn len(&self) -> usize { [INFO] [stderr] 100 | | self.devices.len() [INFO] [stderr] 101 | | } [INFO] [stderr] 102 | | } [INFO] [stderr] | |_^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_without_is_empty)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/webapi/mod.rs:153:26 [INFO] [stderr] | [INFO] [stderr] 153 | let play_state = match self.is_playing { [INFO] [stderr] | __________________________^ [INFO] [stderr] 154 | | true => "Playing", [INFO] [stderr] 155 | | false => "Paused", [INFO] [stderr] 156 | | }; [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if self.is_playing { "Playing" } else { "Paused" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/mod.rs:193:23 [INFO] [stderr] | [INFO] [stderr] 193 | position: self.position.clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.position` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/webapi/mod.rs:227:5 [INFO] [stderr] | [INFO] [stderr] 227 | / pub fn offset_position<'a>(&'a mut self, position: u32) -> &'a mut PlayContext { [INFO] [stderr] 228 | | match self.offset { [INFO] [stderr] 229 | | Some(ref mut o) => o.position = Some(position), [INFO] [stderr] 230 | | None => { [INFO] [stderr] ... | [INFO] [stderr] 236 | | self [INFO] [stderr] 237 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/webapi/mod.rs:262:9 [INFO] [stderr] | [INFO] [stderr] 262 | / match value { [INFO] [stderr] 263 | | Some(v) => { self.map.insert(key.to_string(), v); }, [INFO] [stderr] 264 | | None => {}, [INFO] [stderr] 265 | | } [INFO] [stderr] | |_________^ help: try this: `if let Some(v) = value { self.map.insert(key.to_string(), v); }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/webapi/mod.rs:278:24 [INFO] [stderr] | [INFO] [stderr] 278 | _ => { s = s + "&"; } [INFO] [stderr] | ^^^^^^^^^^^ help: replace it with: `s += "&"` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/webapi/mod.rs:297:17 [INFO] [stderr] | [INFO] [stderr] 297 | let s = match self { [INFO] [stderr] | _________________^ [INFO] [stderr] 298 | | &AlarmRepeat::Daily => "daily", [INFO] [stderr] 299 | | &AlarmRepeat::Weekdays => "weekdays", [INFO] [stderr] 300 | | &AlarmRepeat::Weekends => "weekends", [INFO] [stderr] 301 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 297 | let s = match *self { [INFO] [stderr] 298 | AlarmRepeat::Daily => "daily", [INFO] [stderr] 299 | AlarmRepeat::Weekdays => "weekdays", [INFO] [stderr] 300 | AlarmRepeat::Weekends => "weekends", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:352:34 [INFO] [stderr] | [INFO] [stderr] 352 | let mut fields = s.split(","); [INFO] [stderr] | ^^^ help: try using a char instead: `','` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/webapi/mod.rs:153:26 [INFO] [stderr] | [INFO] [stderr] 153 | let play_state = match self.is_playing { [INFO] [stderr] | __________________________^ [INFO] [stderr] 154 | | true => "Playing", [INFO] [stderr] 155 | | false => "Paused", [INFO] [stderr] 156 | | }; [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if self.is_playing { "Playing" } else { "Paused" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:360:42 [INFO] [stderr] | [INFO] [stderr] 360 | let mut time_fields = time.split(":"); [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/webapi/mod.rs:386:9 [INFO] [stderr] | [INFO] [stderr] 386 | / match self { [INFO] [stderr] 387 | | &SpotifyRepeat::Off => "off".to_string(), [INFO] [stderr] 388 | | &SpotifyRepeat::Track => "track".to_string(), [INFO] [stderr] 389 | | &SpotifyRepeat::Context => "context".to_string(), [INFO] [stderr] 390 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 386 | match *self { [INFO] [stderr] 387 | SpotifyRepeat::Off => "off".to_string(), [INFO] [stderr] 388 | SpotifyRepeat::Track => "track".to_string(), [INFO] [stderr] 389 | SpotifyRepeat::Context => "context".to_string(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/mod.rs:193:23 [INFO] [stderr] | [INFO] [stderr] 193 | position: self.position.clone(), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `self.position` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: explicit lifetimes given in parameter types where they could be elided (or replaced with `'_` if needed by type declaration) [INFO] [stderr] --> src/webapi/mod.rs:227:5 [INFO] [stderr] | [INFO] [stderr] 227 | / pub fn offset_position<'a>(&'a mut self, position: u32) -> &'a mut PlayContext { [INFO] [stderr] 228 | | match self.offset { [INFO] [stderr] 229 | | Some(ref mut o) => o.position = Some(position), [INFO] [stderr] 230 | | None => { [INFO] [stderr] ... | [INFO] [stderr] 236 | | self [INFO] [stderr] 237 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::needless_lifetimes)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/webapi/mod.rs:262:9 [INFO] [stderr] | [INFO] [stderr] 262 | / match value { [INFO] [stderr] 263 | | Some(v) => { self.map.insert(key.to_string(), v); }, [INFO] [stderr] 264 | | None => {}, [INFO] [stderr] 265 | | } [INFO] [stderr] | |_________^ help: try this: `if let Some(v) = value { self.map.insert(key.to_string(), v); }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/webapi/mod.rs:511:5 [INFO] [stderr] | [INFO] [stderr] 511 | / pub fn new() -> SpotifyConnectrBuilder<'a> { [INFO] [stderr] 512 | | SpotifyConnectrBuilder { [INFO] [stderr] 513 | | api: SPOTIFY_API, [INFO] [stderr] 514 | | access: None, [INFO] [stderr] ... | [INFO] [stderr] 517 | | } [INFO] [stderr] 518 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_ret_no_self)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: manual implementation of an assign operation [INFO] [stderr] --> src/webapi/mod.rs:278:24 [INFO] [stderr] | [INFO] [stderr] 278 | _ => { s = s + "&"; } [INFO] [stderr] | ^^^^^^^^^^^ help: replace it with: `s += "&"` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assign_op_pattern [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/webapi/mod.rs:520:25 [INFO] [stderr] | [INFO] [stderr] 520 | let scrobbler = match self.settings.lastfm_enabled { [INFO] [stderr] | _________________________^ [INFO] [stderr] 521 | | false => None, [INFO] [stderr] 522 | | true => match self.settings.lastfm { [INFO] [stderr] 523 | | None => None, [INFO] [stderr] ... | [INFO] [stderr] 529 | | } [INFO] [stderr] 530 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] help: consider using an if/else expression [INFO] [stderr] | [INFO] [stderr] 520 | let scrobbler = if self.settings.lastfm_enabled { match self.settings.lastfm { [INFO] [stderr] 521 | None => None, [INFO] [stderr] 522 | Some(ref fm) => { [INFO] [stderr] 523 | let mut scrob = Scrobbler::new(fm.key.to_owned(), fm.secret.to_owned()); [INFO] [stderr] 524 | scrob.authenticate_with_session_key(fm.session_key.to_owned()); [INFO] [stderr] 525 | Some(scrob) [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/webapi/mod.rs:297:17 [INFO] [stderr] | [INFO] [stderr] 297 | let s = match self { [INFO] [stderr] | _________________^ [INFO] [stderr] 298 | | &AlarmRepeat::Daily => "daily", [INFO] [stderr] 299 | | &AlarmRepeat::Weekdays => "weekdays", [INFO] [stderr] 300 | | &AlarmRepeat::Weekends => "weekends", [INFO] [stderr] 301 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_ref_pats)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 297 | let s = match *self { [INFO] [stderr] 298 | AlarmRepeat::Daily => "daily", [INFO] [stderr] 299 | AlarmRepeat::Weekdays => "weekdays", [INFO] [stderr] 300 | AlarmRepeat::Weekends => "weekends", [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:352:34 [INFO] [stderr] | [INFO] [stderr] 352 | let mut fields = s.split(","); [INFO] [stderr] | ^^^ help: try using a char instead: `','` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:360:42 [INFO] [stderr] | [INFO] [stderr] 360 | let mut time_fields = time.split(":"); [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: you don't need to add `&` to all patterns [INFO] [stderr] --> src/webapi/mod.rs:386:9 [INFO] [stderr] | [INFO] [stderr] 386 | / match self { [INFO] [stderr] 387 | | &SpotifyRepeat::Off => "off".to_string(), [INFO] [stderr] 388 | | &SpotifyRepeat::Track => "track".to_string(), [INFO] [stderr] 389 | | &SpotifyRepeat::Context => "context".to_string(), [INFO] [stderr] 390 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats [INFO] [stderr] help: instead of prefixing all patterns with `&`, you can dereference the expression [INFO] [stderr] | [INFO] [stderr] 386 | match *self { [INFO] [stderr] 387 | SpotifyRepeat::Off => "off".to_string(), [INFO] [stderr] 388 | SpotifyRepeat::Track => "track".to_string(), [INFO] [stderr] 389 | SpotifyRepeat::Context => "context".to_string(), [INFO] [stderr] | [INFO] [stderr] [INFO] [stderr] warning: methods called `new` usually return `Self` [INFO] [stderr] --> src/webapi/mod.rs:511:5 [INFO] [stderr] | [INFO] [stderr] 511 | / pub fn new() -> SpotifyConnectrBuilder<'a> { [INFO] [stderr] 512 | | SpotifyConnectrBuilder { [INFO] [stderr] 513 | | api: SPOTIFY_API, [INFO] [stderr] 514 | | access: None, [INFO] [stderr] ... | [INFO] [stderr] 517 | | } [INFO] [stderr] 518 | | } [INFO] [stderr] | |_____^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::new_ret_no_self)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_ret_no_self [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/webapi/mod.rs:520:25 [INFO] [stderr] | [INFO] [stderr] 520 | let scrobbler = match self.settings.lastfm_enabled { [INFO] [stderr] | _________________________^ [INFO] [stderr] 521 | | false => None, [INFO] [stderr] 522 | | true => match self.settings.lastfm { [INFO] [stderr] 523 | | None => None, [INFO] [stderr] ... | [INFO] [stderr] 529 | | } [INFO] [stderr] 530 | | }; [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] help: consider using an if/else expression [INFO] [stderr] | [INFO] [stderr] 520 | let scrobbler = if self.settings.lastfm_enabled { match self.settings.lastfm { [INFO] [stderr] 521 | None => None, [INFO] [stderr] 522 | Some(ref fm) => { [INFO] [stderr] 523 | let mut scrob = Scrobbler::new(fm.key.to_owned(), fm.secret.to_owned()); [INFO] [stderr] 524 | scrob.authenticate_with_session_key(fm.session_key.to_owned()); [INFO] [stderr] 525 | Some(scrob) [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/webapi/mod.rs:558:25 [INFO] [stderr] | [INFO] [stderr] 558 | Some(dt) => dt.clone(), [INFO] [stderr] | ^^^^^^^^^^ help: try removing the `clone` call: `dt` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/webapi/mod.rs:724:55 [INFO] [stderr] | [INFO] [stderr] 724 | let recv_fn: Box) -> bool> = match blocking { [INFO] [stderr] | _______________________________________________________^ [INFO] [stderr] 725 | | true => Box::new(move |rx| { match rx.recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] 726 | | false => Box::new(move |rx| { match rx.try_recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] 727 | | }; [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if blocking { Box::new(move |rx| { match rx.recv() { Ok(_) => true, Err(_) => false } }) } else { Box::new(move |rx| { match rx.try_recv() { Ok(_) => true, Err(_) => false } }) }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/webapi/mod.rs:724:55 [INFO] [stderr] | [INFO] [stderr] 724 | let recv_fn: Box) -> bool> = match blocking { [INFO] [stderr] | _______________________________________________________^ [INFO] [stderr] 725 | | true => Box::new(move |rx| { match rx.recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] 726 | | false => Box::new(move |rx| { match rx.try_recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] 727 | | }; [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if blocking { Box::new(move |rx| { match rx.recv() { Ok(_) => true, Err(_) => false } }) } else { Box::new(move |rx| { match rx.try_recv() { Ok(_) => true, Err(_) => false } }) }` [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/webapi/mod.rs:725:43 [INFO] [stderr] | [INFO] [stderr] 725 | true => Box::new(move |rx| { match rx.recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `rx.recv().is_ok()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/webapi/mod.rs:726:43 [INFO] [stderr] | [INFO] [stderr] 726 | false => Box::new(move |rx| { match rx.try_recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `rx.try_recv().is_ok()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/webapi/mod.rs:725:43 [INFO] [stderr] | [INFO] [stderr] 725 | true => Box::new(move |rx| { match rx.recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `rx.recv().is_ok()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: redundant pattern matching, consider using `is_ok()` [INFO] [stderr] --> src/webapi/mod.rs:726:43 [INFO] [stderr] | [INFO] [stderr] 726 | false => Box::new(move |rx| { match rx.try_recv() { Ok(_) => true, Err(_) => false } }), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `rx.try_recv().is_ok()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern_matching [INFO] [stderr] [INFO] [stderr] warning: the `e @ _` pattern can be written as just `e` [INFO] [stderr] --> src/webapi/mod.rs:842:13 [INFO] [stderr] | [INFO] [stderr] 842 | e @ _ => { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stderr] [INFO] [stderr] warning: the `e @ _` pattern can be written as just `e` [INFO] [stderr] --> src/webapi/mod.rs:842:13 [INFO] [stderr] | [INFO] [stderr] 842 | e @ _ => { [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_pattern)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:944:42 [INFO] [stderr] | [INFO] [stderr] 944 | let playlist_id = playlist.split(":").last().unwrap(); [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:945:38 [INFO] [stderr] | [INFO] [stderr] 945 | let user_id = playlist.split(":").nth(2).unwrap(); [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:944:42 [INFO] [stderr] | [INFO] [stderr] 944 | let playlist_id = playlist.split(":").last().unwrap(); [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: single-character string constant used as pattern [INFO] [stderr] --> src/webapi/mod.rs:945:38 [INFO] [stderr] | [INFO] [stderr] 945 | let user_id = playlist.split(":").nth(2).unwrap(); [INFO] [stderr] | ^^^ help: try using a char instead: `':'` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_pattern [INFO] [stderr] [INFO] [stderr] warning: `0 as *mut _` detected. Consider using `ptr::null_mut()` [INFO] [stderr] --> src/lib.rs:109:72 [INFO] [stderr] | [INFO] [stderr] 109 | fn add_submenu(&mut self, _: &str, _: NSCallback) -> *mut Object { 0 as *mut Object } [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::zero_ptr)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stderr] [INFO] [stderr] warning: `0 as *mut _` detected. Consider using `ptr::null_mut()` [INFO] [stderr] --> src/lib.rs:111:101 [INFO] [stderr] | [INFO] [stderr] 111 | fn add_item(&mut self, _: Option<*mut Object>, _: &str, _: NSCallback, _: bool) -> *mut Object{ 0 as *mut Object } [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stderr] [INFO] [stderr] warning: `0 as *mut _` detected. Consider using `ptr::null_mut()` [INFO] [stderr] --> src/lib.rs:109:72 [INFO] [stderr] | [INFO] [stderr] 109 | fn add_submenu(&mut self, _: &str, _: NSCallback) -> *mut Object { 0 as *mut Object } [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::zero_ptr)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stderr] [INFO] [stderr] warning: `0 as *mut _` detected. Consider using `ptr::null_mut()` [INFO] [stderr] --> src/lib.rs:111:101 [INFO] [stderr] | [INFO] [stderr] 111 | fn add_item(&mut self, _: Option<*mut Object>, _: &str, _: NSCallback, _: bool) -> *mut Object{ 0 as *mut Object } [INFO] [stderr] | ^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_ptr [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:113:13 [INFO] [stderr] | [INFO] [stderr] 113 | action: action, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `action` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:115:13 [INFO] [stderr] | [INFO] [stderr] 115 | tx: tx, [INFO] [stderr] | ^^^^^^ help: replace it with: `tx` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:361:13 [INFO] [stderr] | [INFO] [stderr] 361 | touchbar: touchbar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `touchbar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:363:13 [INFO] [stderr] | [INFO] [stderr] 363 | root_bar: root_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `root_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:364:13 [INFO] [stderr] | [INFO] [stderr] 364 | playing_label: playing_label, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `playing_label` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:365:13 [INFO] [stderr] | [INFO] [stderr] 365 | label_state: label_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `label_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:366:13 [INFO] [stderr] | [INFO] [stderr] 366 | prev_button: prev_button, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `prev_button` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:367:13 [INFO] [stderr] | [INFO] [stderr] 367 | play_pause_button: play_pause_button, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `play_pause_button` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:368:13 [INFO] [stderr] | [INFO] [stderr] 368 | next_button: next_button, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `next_button` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:370:13 [INFO] [stderr] | [INFO] [stderr] 370 | preset_bar: preset_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `preset_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:371:13 [INFO] [stderr] | [INFO] [stderr] 371 | preset_popover: preset_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `preset_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:373:13 [INFO] [stderr] | [INFO] [stderr] 373 | preset_scrubber: preset_scrubber, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `preset_scrubber` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:375:13 [INFO] [stderr] | [INFO] [stderr] 375 | device_bar: device_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:376:13 [INFO] [stderr] | [INFO] [stderr] 376 | device_popover: device_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:378:13 [INFO] [stderr] | [INFO] [stderr] 378 | device_scrubber: device_scrubber, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_scrubber` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:380:13 [INFO] [stderr] | [INFO] [stderr] 380 | volume_bar: volume_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `volume_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:381:13 [INFO] [stderr] | [INFO] [stderr] 381 | volume_popover: volume_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `volume_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:382:13 [INFO] [stderr] | [INFO] [stderr] 382 | volume_slider: volume_slider, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `volume_slider` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:384:13 [INFO] [stderr] | [INFO] [stderr] 384 | submenu_bar: submenu_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `submenu_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:385:13 [INFO] [stderr] | [INFO] [stderr] 385 | submenu_popover: submenu_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `submenu_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:434:13 [INFO] [stderr] | [INFO] [stderr] 434 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:537:17 [INFO] [stderr] | [INFO] [stderr] 537 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:548:17 [INFO] [stderr] | [INFO] [stderr] 548 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:558:17 [INFO] [stderr] | [INFO] [stderr] 558 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:568:17 [INFO] [stderr] | [INFO] [stderr] 568 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:590:21 [INFO] [stderr] | [INFO] [stderr] 590 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:633:17 [INFO] [stderr] | [INFO] [stderr] 633 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:664:21 [INFO] [stderr] | [INFO] [stderr] 664 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:679:13 [INFO] [stderr] | [INFO] [stderr] 679 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:689:13 [INFO] [stderr] | [INFO] [stderr] 689 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:872:25 [INFO] [stderr] | [INFO] [stderr] 872 | artist: artist, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `artist` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:1096:9 [INFO] [stderr] | [INFO] [stderr] 1096 | device_list: device_list, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_list` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:1097:9 [INFO] [stderr] | [INFO] [stderr] 1097 | player_state: player_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `player_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:1098:9 [INFO] [stderr] | [INFO] [stderr] 1098 | presets: presets, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `presets` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:113:13 [INFO] [stderr] | [INFO] [stderr] 113 | action: action, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `action` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_field_names)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:115:13 [INFO] [stderr] | [INFO] [stderr] 115 | tx: tx, [INFO] [stderr] | ^^^^^^ help: replace it with: `tx` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:361:13 [INFO] [stderr] | [INFO] [stderr] 361 | touchbar: touchbar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `touchbar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:363:13 [INFO] [stderr] | [INFO] [stderr] 363 | root_bar: root_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^ help: replace it with: `root_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:364:13 [INFO] [stderr] | [INFO] [stderr] 364 | playing_label: playing_label, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `playing_label` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:365:13 [INFO] [stderr] | [INFO] [stderr] 365 | label_state: label_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `label_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:366:13 [INFO] [stderr] | [INFO] [stderr] 366 | prev_button: prev_button, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `prev_button` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:367:13 [INFO] [stderr] | [INFO] [stderr] 367 | play_pause_button: play_pause_button, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `play_pause_button` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:368:13 [INFO] [stderr] | [INFO] [stderr] 368 | next_button: next_button, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `next_button` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:370:13 [INFO] [stderr] | [INFO] [stderr] 370 | preset_bar: preset_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `preset_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:371:13 [INFO] [stderr] | [INFO] [stderr] 371 | preset_popover: preset_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `preset_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:373:13 [INFO] [stderr] | [INFO] [stderr] 373 | preset_scrubber: preset_scrubber, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `preset_scrubber` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:375:13 [INFO] [stderr] | [INFO] [stderr] 375 | device_bar: device_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:376:13 [INFO] [stderr] | [INFO] [stderr] 376 | device_popover: device_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:378:13 [INFO] [stderr] | [INFO] [stderr] 378 | device_scrubber: device_scrubber, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_scrubber` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:380:13 [INFO] [stderr] | [INFO] [stderr] 380 | volume_bar: volume_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `volume_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:381:13 [INFO] [stderr] | [INFO] [stderr] 381 | volume_popover: volume_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `volume_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:382:13 [INFO] [stderr] | [INFO] [stderr] 382 | volume_slider: volume_slider, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `volume_slider` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:384:13 [INFO] [stderr] | [INFO] [stderr] 384 | submenu_bar: submenu_bar, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `submenu_bar` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:385:13 [INFO] [stderr] | [INFO] [stderr] 385 | submenu_popover: submenu_popover, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `submenu_popover` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:434:13 [INFO] [stderr] | [INFO] [stderr] 434 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:537:17 [INFO] [stderr] | [INFO] [stderr] 537 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:548:17 [INFO] [stderr] | [INFO] [stderr] 548 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:558:17 [INFO] [stderr] | [INFO] [stderr] 558 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:568:17 [INFO] [stderr] | [INFO] [stderr] 568 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:590:21 [INFO] [stderr] | [INFO] [stderr] 590 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:633:17 [INFO] [stderr] | [INFO] [stderr] 633 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:664:21 [INFO] [stderr] | [INFO] [stderr] 664 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:679:13 [INFO] [stderr] | [INFO] [stderr] 679 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:689:13 [INFO] [stderr] | [INFO] [stderr] 689 | sender: sender, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `sender` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:872:25 [INFO] [stderr] | [INFO] [stderr] 872 | artist: artist, [INFO] [stderr] | ^^^^^^^^^^^^^^ help: replace it with: `artist` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:1096:9 [INFO] [stderr] | [INFO] [stderr] 1096 | device_list: device_list, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `device_list` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:1097:9 [INFO] [stderr] | [INFO] [stderr] 1097 | player_state: player_state, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace it with: `player_state` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: redundant field names in struct initialization [INFO] [stderr] --> src/main.rs:1098:9 [INFO] [stderr] | [INFO] [stderr] 1098 | presets: presets, [INFO] [stderr] | ^^^^^^^^^^^^^^^^ help: replace it with: `presets` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:145:9 [INFO] [stderr] | [INFO] [stderr] 145 | width [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/main.rs:144:21 [INFO] [stderr] | [INFO] [stderr] 144 | let width = len * 8 + 20; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: returning the result of a let binding from a block. Consider returning the expression directly. [INFO] [stderr] --> src/main.rs:145:9 [INFO] [stderr] | [INFO] [stderr] 145 | width [INFO] [stderr] | ^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::let_and_return)] on by default [INFO] [stderr] note: this expression can be directly returned [INFO] [stderr] --> src/main.rs:144:21 [INFO] [stderr] | [INFO] [stderr] 144 | let width = len * 8 + 20; [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#let_and_return [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:296:19 [INFO] [stderr] | [INFO] [stderr] 296 | Some(&format!("{}", "Presets")), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Presets".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:307:19 [INFO] [stderr] | [INFO] [stderr] 307 | Some(&format!("{}", "Devices")), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Devices".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:391:43 [INFO] [stderr] | [INFO] [stderr] 391 | TouchbarLabelState::Track => format!("{}", track), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `track.to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:392:44 [INFO] [stderr] | [INFO] [stderr] 392 | TouchbarLabelState::Artist => format!("{}", artist), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `artist.to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:398:58 [INFO] [stderr] | [INFO] [stderr] 398 | self.touchbar.update_slider(&self.volume_slider, volume as f64); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `f64::from(volume)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:408:21 [INFO] [stderr] | [INFO] [stderr] 408 | let image = match is_playing { [INFO] [stderr] | _____________________^ [INFO] [stderr] 409 | | true => self.touchbar.create_image_from_template(ImageTemplate::PauseTemplate), [INFO] [stderr] 410 | | false => self.touchbar.create_image_from_template(ImageTemplate::PlayTemplate), [INFO] [stderr] 411 | | }; [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if is_playing { self.touchbar.create_image_from_template(ImageTemplate::PauseTemplate) } else { self.touchbar.create_image_from_template(ImageTemplate::PlayTemplate) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:417:5 [INFO] [stderr] | [INFO] [stderr] 417 | / match is_playing { [INFO] [stderr] 418 | | true => "Pause", [INFO] [stderr] 419 | | false => "Play", [INFO] [stderr] 420 | | } [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if is_playing { "Pause" } else { "Play" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:296:19 [INFO] [stderr] | [INFO] [stderr] 296 | Some(&format!("{}", "Presets")), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Presets".to_string()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::useless_format)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:307:19 [INFO] [stderr] | [INFO] [stderr] 307 | Some(&format!("{}", "Devices")), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `"Devices".to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:391:43 [INFO] [stderr] | [INFO] [stderr] 391 | TouchbarLabelState::Track => format!("{}", track), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `track.to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: useless use of `format!` [INFO] [stderr] --> src/main.rs:392:44 [INFO] [stderr] | [INFO] [stderr] 392 | TouchbarLabelState::Artist => format!("{}", artist), [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^ help: consider using .to_string(): `artist.to_string()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stderr] = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: casting u32 to f64 may become silently lossy if types change [INFO] [stderr] --> src/main.rs:398:58 [INFO] [stderr] | [INFO] [stderr] 398 | self.touchbar.update_slider(&self.volume_slider, volume as f64); [INFO] [stderr] | ^^^^^^^^^^^^^ help: try: `f64::from(volume)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::cast_lossless)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cast_lossless [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:408:21 [INFO] [stderr] | [INFO] [stderr] 408 | let image = match is_playing { [INFO] [stderr] | _____________________^ [INFO] [stderr] 409 | | true => self.touchbar.create_image_from_template(ImageTemplate::PauseTemplate), [INFO] [stderr] 410 | | false => self.touchbar.create_image_from_template(ImageTemplate::PlayTemplate), [INFO] [stderr] 411 | | }; [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if is_playing { self.touchbar.create_image_from_template(ImageTemplate::PauseTemplate) } else { self.touchbar.create_image_from_template(ImageTemplate::PlayTemplate) }` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::match_bool)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:417:5 [INFO] [stderr] | [INFO] [stderr] 417 | / match is_playing { [INFO] [stderr] 418 | | true => "Pause", [INFO] [stderr] 419 | | false => "Play", [INFO] [stderr] 420 | | } [INFO] [stderr] | |_____^ help: consider using an if/else expression: `if is_playing { "Pause" } else { "Play" }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:533:26 [INFO] [stderr] | [INFO] [stderr] 533 | let is_playing = player_state.is_playing.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `player_state.is_playing` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:585:17 [INFO] [stderr] | [INFO] [stderr] 585 | let ref name = preset.0; [INFO] [stderr] | ----^^^^^^^^------------ help: try: `let name = &preset.0;` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/main.rs:607:26 [INFO] [stderr] | [INFO] [stderr] 607 | (d.name.clone(), d.id.clone().unwrap_or(String::new())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `d.id.clone().unwrap_or_default()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/main.rs:533:26 [INFO] [stderr] | [INFO] [stderr] 533 | let is_playing = player_state.is_playing.clone(); [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try removing the `clone` call: `player_state.is_playing` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:730:17 [INFO] [stderr] | [INFO] [stderr] 730 | / match player_state.is_playing { [INFO] [stderr] 731 | | true => {require(spotify.pause());}, [INFO] [stderr] 732 | | false => {require(spotify.play(None));}, [INFO] [stderr] 733 | | } [INFO] [stderr] | |_________________^ help: consider using an if/else expression: `if player_state.is_playing {require(spotify.pause());} else {require(spotify.play(None));}` [INFO] [stderr] warning: `ref` on an entire `let` pattern is discouraged, take a reference with `&` instead [INFO] [stderr] --> src/main.rs:585:17 [INFO] [stderr] | [INFO] [stderr] 585 | let ref name = preset.0; [INFO] [stderr] | [INFO] [stderr] | ----^^^^^^^^------------ help: try: `let name = &preset.0;` [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::toplevel_ref_arg)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#toplevel_ref_arg [INFO] [stderr] [INFO] [stderr] warning: use of `unwrap_or` followed by a call to `new` [INFO] [stderr] --> src/main.rs:607:26 [INFO] [stderr] | [INFO] [stderr] 607 | (d.name.clone(), d.id.clone().unwrap_or(String::new())) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `d.id.clone().unwrap_or_default()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::or_fun_call)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#or_fun_call [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:780:13 [INFO] [stderr] | [INFO] [stderr] 780 | / match state.is_playing { [INFO] [stderr] 781 | | true => { [INFO] [stderr] 782 | | let duration_ms = match state.item { [INFO] [stderr] 783 | | Some(ref item) => item.duration_ms, [INFO] [stderr] ... | [INFO] [stderr] 800 | | false => REFRESH_PERIOD, [INFO] [stderr] 801 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] help: consider using an if/else expression [INFO] [stderr] | [INFO] [stderr] 780 | if state.is_playing { [INFO] [stderr] 781 | let duration_ms = match state.item { [INFO] [stderr] 782 | Some(ref item) => item.duration_ms, [INFO] [stderr] 783 | _ => 0, [INFO] [stderr] 784 | }; [INFO] [stderr] 785 | let track_end = match state.progress_ms { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:730:17 [INFO] [stderr] | [INFO] [stderr] 730 | / match player_state.is_playing { [INFO] [stderr] 731 | | true => {require(spotify.pause());}, [INFO] [stderr] 732 | | false => {require(spotify.play(None));}, [INFO] [stderr] 733 | | } [INFO] [stderr] | |_________________^ help: consider using an if/else expression: `if player_state.is_playing {require(spotify.pause());} else {require(spotify.play(None));}` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:908:9 [INFO] [stderr] | [INFO] [stderr] 908 | / match new_track.unwrap().is_playing { [INFO] [stderr] 909 | | true => { return StateChange::Changed(0); }, [INFO] [stderr] 910 | | false => { return StateChange::Stopped(0); }, [INFO] [stderr] 911 | | } [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if new_track.unwrap().is_playing { return StateChange::Changed(0); } else { return StateChange::Stopped(0); }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:780:13 [INFO] [stderr] | [INFO] [stderr] 780 | / match state.is_playing { [INFO] [stderr] 781 | | true => { [INFO] [stderr] 782 | | let duration_ms = match state.item { [INFO] [stderr] 783 | | Some(ref item) => item.duration_ms, [INFO] [stderr] ... | [INFO] [stderr] 800 | | false => REFRESH_PERIOD, [INFO] [stderr] 801 | | } [INFO] [stderr] | |_____________^ [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] help: consider using an if/else expression [INFO] [stderr] | [INFO] [stderr] 780 | if state.is_playing { [INFO] [stderr] 781 | let duration_ms = match state.item { [INFO] [stderr] 782 | Some(ref item) => item.duration_ms, [INFO] [stderr] 783 | _ => 0, [INFO] [stderr] 784 | }; [INFO] [stderr] 785 | let track_end = match state.progress_ms { [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to match on a boolean expression [INFO] [stderr] --> src/main.rs:908:9 [INFO] [stderr] | [INFO] [stderr] 908 | / match new_track.unwrap().is_playing { [INFO] [stderr] 909 | | true => { return StateChange::Changed(0); }, [INFO] [stderr] 910 | | false => { return StateChange::Stopped(0); }, [INFO] [stderr] 911 | | } [INFO] [stderr] | |_________^ help: consider using an if/else expression: `if new_track.unwrap().is_playing { return StateChange::Changed(0); } else { return StateChange::Stopped(0); }` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_bool [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:1186:9 [INFO] [stderr] | [INFO] [stderr] 1186 | / match spotify_thread.rx.recv_timeout(Duration::from_millis(100)) { [INFO] [stderr] 1187 | | Ok(cmd) => { [INFO] [stderr] 1188 | | match cmd { [INFO] [stderr] 1189 | | SpotifyThreadCommand::Update => { need_redraw = true; }, [INFO] [stderr] ... | [INFO] [stderr] 1204 | | Err(_) => {} [INFO] [stderr] 1205 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 1186 | if let Ok(cmd) = spotify_thread.rx.recv_timeout(Duration::from_millis(100)) { [INFO] [stderr] 1187 | match cmd { [INFO] [stderr] 1188 | SpotifyThreadCommand::Update => { need_redraw = true; }, [INFO] [stderr] 1189 | SpotifyThreadCommand::InvalidSettings => { [INFO] [stderr] 1190 | clear_menu(&mut app, &mut status); [INFO] [stderr] 1191 | reconfig_menu(&mut status); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] warning: you seem to be trying to use match for destructuring a single pattern. Consider using `if let` [INFO] [stderr] --> src/main.rs:1186:9 [INFO] [stderr] | [INFO] [stderr] 1186 | / match spotify_thread.rx.recv_timeout(Duration::from_millis(100)) { [INFO] [stderr] 1187 | | Ok(cmd) => { [INFO] [stderr] 1188 | | match cmd { [INFO] [stderr] 1189 | | SpotifyThreadCommand::Update => { need_redraw = true; }, [INFO] [stderr] ... | [INFO] [stderr] 1204 | | Err(_) => {} [INFO] [stderr] 1205 | | } [INFO] [stderr] | |_________^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::single_match)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stderr] help: try this [INFO] [stderr] | [INFO] [stderr] 1186 | if let Ok(cmd) = spotify_thread.rx.recv_timeout(Duration::from_millis(100)) { [INFO] [stderr] 1187 | match cmd { [INFO] [stderr] 1188 | SpotifyThreadCommand::Update => { need_redraw = true; }, [INFO] [stderr] 1189 | SpotifyThreadCommand::InvalidSettings => { [INFO] [stderr] 1190 | clear_menu(&mut app, &mut status); [INFO] [stderr] 1191 | reconfig_menu(&mut status); [INFO] [stderr] ... [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 1m 25s [INFO] running `"docker" "inspect" "f66114164401449c0b954b6e070037b0c01fb6bb50de3e3f4c0105ed216fcee6"` [INFO] running `"docker" "rm" "-f" "f66114164401449c0b954b6e070037b0c01fb6bb50de3e3f4c0105ed216fcee6"` [INFO] [stdout] f66114164401449c0b954b6e070037b0c01fb6bb50de3e3f4c0105ed216fcee6
Time eh?RepeatSpotify URI eh?Device ID eh?