[INFO] fetching crate jami-cli 0.4.0... [INFO] linting jami-cli-0.4.0 against nightly for clippy-nonminimal_bool-denied [INFO] extracting crate jami-cli 0.4.0 into /workspace/builds/worker-2-tc1/source [INFO] started tweaking crates.io crate jami-cli 0.4.0 [INFO] finished tweaking crates.io crate jami-cli 0.4.0 [INFO] tweaked toml for crates.io crate jami-cli 0.4.0 written to /workspace/builds/worker-2-tc1/source/Cargo.toml [INFO] validating manifest of crates.io crate jami-cli 0.4.0 on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate jami-cli 0.4.0 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Updating crates.io index [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded structopt-derive v0.4.14 [INFO] [stderr] Downloaded pin-project-lite v0.1.11 [INFO] [stderr] Downloaded net2 v0.2.37 [INFO] [stderr] Downloaded dirs-sys v0.3.5 [INFO] [stderr] Downloaded libdbus-sys v0.2.1 [INFO] [stderr] Downloaded jami-rs v0.2.0 [INFO] [stderr] Downloaded vcpkg v0.2.11 [INFO] [stderr] Downloaded anyhow v1.0.38 [INFO] [stderr] Downloaded dbus-tokio v0.6.0 [INFO] [stderr] Downloaded mio v0.7.7 [INFO] [stderr] Downloaded dbus v0.9.1 [INFO] [stderr] Downloaded serde_json v1.0.62 [INFO] [stderr] Downloaded tui v0.12.0 [INFO] [stderr] Downloaded rusqlite v0.24.2 [INFO] [stderr] Downloaded crossterm v0.17.7 [INFO] [stderr] Downloaded ahash v0.4.7 [INFO] [stderr] Downloaded hashlink v0.6.0 [INFO] [stderr] Downloaded structopt v0.3.21 [INFO] [stderr] Downloaded dirs v3.0.1 [INFO] [stderr] Downloaded crossterm_winapi v0.6.2 [INFO] [stderr] Downloaded libsqlite3-sys v0.20.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 098a2add5ccbb52097457b45c3ecc0d4fe89536c95cd4af41982868aa9828d64 [INFO] running `Command { std: "docker" "start" "-a" "098a2add5ccbb52097457b45c3ecc0d4fe89536c95cd4af41982868aa9828d64", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "098a2add5ccbb52097457b45c3ecc0d4fe89536c95cd4af41982868aa9828d64", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "098a2add5ccbb52097457b45c3ecc0d4fe89536c95cd4af41982868aa9828d64", kill_on_drop: false }` [INFO] [stdout] 098a2add5ccbb52097457b45c3ecc0d4fe89536c95cd4af41982868aa9828d64 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-2-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+nightly" "clippy" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 719ff1d15adaf0c3b5fef1532794659e29ea3e56b21ea4143707aec8fe4dc0ec [INFO] running `Command { std: "docker" "start" "-a" "719ff1d15adaf0c3b5fef1532794659e29ea3e56b21ea4143707aec8fe4dc0ec", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.86 [INFO] [stderr] Compiling proc-macro2 v1.0.24 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.60 [INFO] [stderr] Compiling log v0.4.14 [INFO] [stderr] Compiling pkg-config v0.3.19 [INFO] [stderr] Compiling memchr v2.3.4 [INFO] [stderr] Compiling proc-macro-hack v0.5.19 [INFO] [stderr] Checking slab v0.4.2 [INFO] [stderr] Checking futures-core v0.3.12 [INFO] [stderr] Compiling proc-macro-nested v0.1.7 [INFO] [stderr] Compiling serde_derive v1.0.123 [INFO] [stderr] Checking once_cell v1.5.2 [INFO] [stderr] Checking pin-project-lite v0.2.4 [INFO] [stderr] Checking smallvec v1.6.1 [INFO] [stderr] Checking futures-task v0.3.12 [INFO] [stderr] Checking futures-io v0.3.12 [INFO] [stderr] Compiling serde v1.0.123 [INFO] [stderr] Compiling libdbus-sys v0.2.1 [INFO] [stderr] Compiling proc-macro-error-attr v1.0.4 [INFO] [stderr] Compiling libsqlite3-sys v0.20.1 [INFO] [stderr] Compiling num-traits v0.2.14 [INFO] [stderr] Compiling proc-macro-error v1.0.4 [INFO] [stderr] Checking scopeguard v1.1.0 [INFO] [stderr] Checking ahash v0.4.7 [INFO] [stderr] Checking lock_api v0.3.4 [INFO] [stderr] Checking signal-hook-registry v1.3.0 [INFO] [stderr] Checking net2 v0.2.37 [INFO] [stderr] Checking iovec v0.1.4 [INFO] [stderr] Compiling quote v1.0.8 [INFO] [stderr] Checking parking_lot_core v0.7.2 [INFO] [stderr] Checking hashbrown v0.9.1 [INFO] [stderr] Checking mio v0.7.7 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking mio v0.6.23 [INFO] [stderr] Checking futures-channel v0.3.12 [INFO] [stderr] Checking pin-project-lite v0.1.11 [INFO] [stderr] Compiling serde_json v1.0.62 [INFO] [stderr] Compiling heck v0.3.2 [INFO] [stderr] Checking signal-hook v0.1.17 [INFO] [stderr] Checking parking_lot v0.10.2 [INFO] [stderr] Checking atty v0.2.14 [INFO] [stderr] Checking dirs-sys v0.3.5 [INFO] [stderr] Checking fallible-iterator v0.2.0 [INFO] [stderr] Checking xdg v2.2.0 [INFO] [stderr] Compiling anyhow v1.0.38 [INFO] [stderr] Checking itoa v0.4.7 [INFO] [stderr] Checking hashlink v0.6.0 [INFO] [stderr] Checking fallible-streaming-iterator v0.1.9 [INFO] [stderr] Checking app_dirs v1.2.1 [INFO] [stderr] Checking clap v2.33.3 [INFO] [stderr] Checking num-integer v0.1.44 [INFO] [stderr] Checking dirs v3.0.1 [INFO] [stderr] Checking mio-uds v0.6.8 [INFO] [stderr] Checking time v0.1.44 [INFO] [stderr] Checking unicode-segmentation v1.7.1 [INFO] [stderr] Checking itertools v0.9.0 [INFO] [stderr] Checking rusqlite v0.24.2 [INFO] [stderr] Checking textwrap v0.12.1 [INFO] [stderr] Checking base64 v0.12.3 [INFO] [stderr] Compiling futures-macro v0.3.12 [INFO] [stderr] Compiling tokio-macros v0.2.6 [INFO] [stderr] Compiling structopt-derive v0.4.14 [INFO] [stderr] Compiling thiserror-impl v1.0.23 [INFO] [stderr] Checking tokio v0.2.25 [INFO] [stderr] Checking futures-util v0.3.12 [INFO] [stderr] Checking thiserror v1.0.23 [INFO] [stderr] Checking structopt v0.3.21 [INFO] [stderr] Checking dbus v0.9.1 [INFO] [stderr] Checking crossterm v0.17.7 [INFO] [stderr] Checking tui v0.12.0 [INFO] [stderr] Checking dbus-tokio v0.6.0 [INFO] [stderr] Checking toml v0.5.8 [INFO] [stderr] Checking chrono v0.4.19 [INFO] [stderr] Checking jami-rs v0.2.0 [INFO] [stderr] Checking jami-cli v0.4.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/app.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use dirs; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/app.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | use dirs; [INFO] [stdout] | ^^^^^^^^^ help: remove it entirely [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports [INFO] [stdout] = note: `#[warn(clippy::single_component_path_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/app.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | / if self.data.input_cursor > 0 [INFO] [stdout] 72 | | && self.data.input_cursor < self.data.input.width() + 1 [INFO] [stdout] 73 | | { [INFO] [stdout] 74 | | self.data.input_cursor = self.data.input_cursor.saturating_sub(1); [INFO] [stdout] ... | [INFO] [stdout] 82 | | self.data.input.remove(idx); [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ KeyCode::Backspace [INFO] [stdout] 71 | if self.data.input_cursor > 0 [INFO] [stdout] 72 | && self.data.input_cursor < self.data.input.width() + 1 [INFO] [stdout] 73 ~ => { [INFO] [stdout] 74 | self.data.input_cursor = self.data.input_cursor.saturating_sub(1); [INFO] [stdout] ... [INFO] [stdout] 82 | self.data.input.remove(idx); [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `info` after checking its variant with `is_none` [INFO] [stdout] --> src/app.rs:332:36 [INFO] [stdout] | [INFO] [stdout] 327 | if info.is_none() { [INFO] [stdout] | ----------------- help: try: `if let Some() = info` [INFO] [stdout] ... [INFO] [stdout] 332 | let info = info.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | Jami::add_contact(&account_id, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:125:42 [INFO] [stdout] | [INFO] [stdout] 125 | Jami::send_trust_request(&account_id, &member, Vec::new() /* TODO */); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/app.rs:128:20 [INFO] [stdout] | [INFO] [stdout] 128 | if member.find("@") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `member.find("@").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:140:35 [INFO] [stdout] | [INFO] [stdout] 140 | Jami::lookup_name(&account_id, &ns, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:149:45 [INFO] [stdout] | [INFO] [stdout] 149 | .push(Message::info(String::from(format!("{}", account)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}", account)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:158:49 [INFO] [stdout] | [INFO] [stdout] 158 | ... .push(Message::info(String::from(format!("{}: {}", key, value)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}: {}", key, value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/app.rs:168:34 [INFO] [stdout] | [INFO] [stdout] 168 | for (key2, _) in &details { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 168 - for (key2, _) in &details { [INFO] [stdout] 168 + for key2 in details.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/app.rs:180:49 [INFO] [stdout] | [INFO] [stdout] 180 | let account = Jami::get_account(&*account_id); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/app.rs:203:34 [INFO] [stdout] | [INFO] [stdout] 203 | Jami::rm_account(&*account_id); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:255:42 [INFO] [stdout] | [INFO] [stdout] 255 | if Jami::rm_conversation(&account_id, &channel.id) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:265:51 [INFO] [stdout] | [INFO] [stdout] 265 | Jami::add_conversation_member(&account_id, &channel.id, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/app.rs:268:24 [INFO] [stdout] | [INFO] [stdout] 268 | if member.find("@") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `member.find("@").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:280:39 [INFO] [stdout] | [INFO] [stdout] 280 | Jami::lookup_name(&account_id, &ns, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:286:49 [INFO] [stdout] | [INFO] [stdout] 286 | Jami::update_conversation_infos(&account_id, &channel.id, infos); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:292:49 [INFO] [stdout] | [INFO] [stdout] 292 | Jami::update_conversation_infos(&account_id, &channel.id, infos); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:297:50 [INFO] [stdout] | [INFO] [stdout] 297 | Jami::rm_conversation_member(&account_id, &channel.id, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/app.rs:300:24 [INFO] [stdout] | [INFO] [stdout] 300 | if member.find("@") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `member.find("@").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:312:39 [INFO] [stdout] | [INFO] [stdout] 312 | Jami::lookup_name(&account_id, &ns, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:348:48 [INFO] [stdout] | [INFO] [stdout] 348 | Jami::accept_file_transfer(&account_id, &channel.id, tid, &path); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:354:44 [INFO] [stdout] | [INFO] [stdout] 354 | Jami::cancel_file_transfer(&account_id, &channel.id, tid); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:389:49 [INFO] [stdout] | [INFO] [stdout] 389 | Jami::send_conversation_message(&account_id, &channel.id, &message, &String::new()); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:395:43 [INFO] [stdout] | [INFO] [stdout] 395 | Jami::decline_request(&account_id, &channel.id); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:397:49 [INFO] [stdout] | [INFO] [stdout] 397 | Jami::discard_trust_request(&account_id, &from_request); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:406:42 [INFO] [stdout] | [INFO] [stdout] 406 | Jami::accept_request(&account_id, &channel.id); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:411:48 [INFO] [stdout] | [INFO] [stdout] 411 | Jami::accept_trust_request(&account_id, &from_request); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:527:28 [INFO] [stdout] | [INFO] [stdout] 527 | if !info.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `info.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `info` after checking its variant with `is_none` [INFO] [stdout] --> src/app.rs:528:44 [INFO] [stdout] | [INFO] [stdout] 527 | if !info.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 528 | status = match info.unwrap().last_event { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:487:47 [INFO] [stdout] | [INFO] [stdout] 487 | ... .display_name(&payloads.get("invited").unwrap_or(&String::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `payloads.get("invited").unwrap_or(&String::new())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:488:47 [INFO] [stdout] | [INFO] [stdout] 488 | ... initial_message = String::from(format!( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 489 | | ... "--> started a private conversation with {}", [INFO] [stdout] 490 | | ... uri [INFO] [stdout] 491 | | ... )); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `String::from()` [INFO] [stdout] | [INFO] [stdout] 488 ~ initial_message = format!( [INFO] [stdout] 489 + "--> started a private conversation with {}", [INFO] [stdout] 490 + uri [INFO] [stdout] 491 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/app.rs:514:39 [INFO] [stdout] | [INFO] [stdout] 514 | ... message = format!("❌ Call missed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"❌ Call missed".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:518:29 [INFO] [stdout] | [INFO] [stdout] 518 | ... String::from(message), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:547:29 [INFO] [stdout] | [INFO] [stdout] 547 | ... String::from(message), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:569:33 [INFO] [stdout] | [INFO] [stdout] 569 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:576:33 [INFO] [stdout] | [INFO] [stdout] 576 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:583:33 [INFO] [stdout] | [INFO] [stdout] 583 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:590:33 [INFO] [stdout] | [INFO] [stdout] 590 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:594:90 [INFO] [stdout] | [INFO] [stdout] 594 | channel.members = AppData::get_conversations_members(account_id, &conversation_id); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `conversation_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:601:29 [INFO] [stdout] | [INFO] [stdout] 601 | ... String::from(format!("{:?}", payloads)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{:?}", payloads)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/app.rs:689:13 [INFO] [stdout] | [INFO] [stdout] 689 | &*format!("{}/profiles", account_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}/profiles", account_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/app.rs:695:72 [INFO] [stdout] | [INFO] [stdout] 695 | let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(&*from)); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 695 - let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(&*from)); [INFO] [stdout] 695 + let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(from)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 695 | let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(&**from)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:701:27 [INFO] [stdout] | [INFO] [stdout] 701 | Jami::lookup_name(&account_id, &String::new(), &from); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:701:56 [INFO] [stdout] | [INFO] [stdout] 701 | Jami::lookup_name(&account_id, &String::new(), &from); [INFO] [stdout] | ^^^^^ help: change this to: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:735:12 [INFO] [stdout] | [INFO] [stdout] 735 | if !info.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `info.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `info` after checking its variant with `is_none` [INFO] [stdout] --> src/app.rs:736:24 [INFO] [stdout] | [INFO] [stdout] 735 | if !info.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 736 | let info = info.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/app.rs:737:13 [INFO] [stdout] | [INFO] [stdout] 737 | / ... match self.data.transfer_manager.path(account_id.clone(), conversation_id.clone(), tid.to_string()) { [INFO] [stdout] 738 | | ... None => { [INFO] [stdout] 739 | | ... if info.flags == 0 /* outgoing */ { [INFO] [stdout] 740 | | ... self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] ... | [INFO] [stdout] 745 | | ... _ => {}, [INFO] [stdout] 746 | | ... }; [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 737 ~ if self.data.transfer_manager.path(account_id.clone(), conversation_id.clone(), tid.to_string()) == None { [INFO] [stdout] 738 + if info.flags == 0 /* outgoing */ { [INFO] [stdout] 739 + self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 740 + } else if status == 6 /* Finished */ { [INFO] [stdout] 741 + self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 742 + } [INFO] [stdout] 743 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/app.rs:739:55 [INFO] [stdout] | [INFO] [stdout] 739 | ... if info.flags == 0 /* outgoing */ { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 740 | | ... self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 741 | | ... } else if status == 6 /* Finished */ { [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/app.rs:741:58 [INFO] [stdout] | [INFO] [stdout] 741 | ... } else if status == 6 /* Finished */ { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 742 | | ... self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 743 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/app.rs:749:16 [INFO] [stdout] | [INFO] [stdout] 749 | if account_id == &*self.data.account.id { [INFO] [stdout] | ^^^^^^^^^^^^^^---------------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `*self.data.account.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:861:36 [INFO] [stdout] | [INFO] [stdout] 861 | .push(Channel::new(&from, ChannelType::TrustRequest(from.clone()))); [INFO] [stdout] | ^^^^^ help: change this to: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/app.rs:903:69 [INFO] [stdout] | [INFO] [stdout] 903 | if channel.id == out_invite.channel.clone().unwrap_or(String::new()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `file` after checking its variant with `is_ok` [INFO] [stdout] --> src/appdata.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 51 | if file.is_ok() { [INFO] [stdout] | --------------- help: try: `if let Ok() = file` [INFO] [stdout] 52 | for line in io::BufReader::new(file.unwrap()).lines() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/appdata.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | String::from(line.unwrap()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `line.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/appdata.rs:100:65 [INFO] [stdout] | [INFO] [stdout] 100 | let members_from_daemon = Jami::get_members(account_id, &conversation); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `conversation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/appdata.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | if member["role"].to_string() == "admin" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `member["role"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/appdata.rs:106:23 [INFO] [stdout] | [INFO] [stdout] 106 | } else if member["role"].to_string() == "invited" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `member["role"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ui.rs:89:61 [INFO] [stdout] | [INFO] [stdout] 89 | let extra_cursor_line = if app.data.input_cursor > 0 && app.data.input_cursor % text_width == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `app.data.input_cursor.is_multiple_of(text_width)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:167:34 [INFO] [stdout] | [INFO] [stdout] 167 | textwrap::indent(&from, &" ".repeat(max_username_width - from.width())), [INFO] [stdout] | ^^^^^ help: change this to: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/ui.rs:288:25 [INFO] [stdout] | [INFO] [stdout] 288 | let space_pos = name.find(' ').unwrap_or_else(|| name.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 288 - let space_pos = name.find(' ').unwrap_or_else(|| name.len()); [INFO] [stdout] 288 + let space_pos = name.find(' ').unwrap_or(name.len()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:291:9 [INFO] [stdout] | [INFO] [stdout] 291 | &name [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/util.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn new(id: &String, channel_type: ChannelType) -> Channel { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 59 ~ pub fn new(id: &str, channel_type: ChannelType) -> Channel { [INFO] [stdout] 60 | Channel { [INFO] [stdout] 61 ~ id: id.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | return name; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 89 - return name; [INFO] [stdout] 89 + name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/util.rs:82:24 [INFO] [stdout] | [INFO] [stdout] 82 | name = String::from(format!("🔵 {}", self.id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("🔵 {}", self.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/util.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | name = String::from(format!("🟠 {}", self.id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("🟠 {}", self.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/util.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | if infos.get("title") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `infos.get("title").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/util.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | if infos.get("description") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `infos.get("description").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/app.rs:71:17 [INFO] [stdout] | [INFO] [stdout] 71 | / if self.data.input_cursor > 0 [INFO] [stdout] 72 | | && self.data.input_cursor < self.data.input.width() + 1 [INFO] [stdout] 73 | | { [INFO] [stdout] 74 | | self.data.input_cursor = self.data.input_cursor.saturating_sub(1); [INFO] [stdout] ... | [INFO] [stdout] 82 | | self.data.input.remove(idx); [INFO] [stdout] 83 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] = note: `#[warn(clippy::collapsible_match)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 70 ~ KeyCode::Backspace [INFO] [stdout] 71 | if self.data.input_cursor > 0 [INFO] [stdout] 72 | && self.data.input_cursor < self.data.input.width() + 1 [INFO] [stdout] 73 ~ => { [INFO] [stdout] 74 | self.data.input_cursor = self.data.input_cursor.saturating_sub(1); [INFO] [stdout] ... [INFO] [stdout] 82 | self.data.input.remove(idx); [INFO] [stdout] 83 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `info` after checking its variant with `is_none` [INFO] [stdout] --> src/app.rs:332:36 [INFO] [stdout] | [INFO] [stdout] 327 | if info.is_none() { [INFO] [stdout] | ----------------- help: try: `if let Some() = info` [INFO] [stdout] ... [INFO] [stdout] 332 | let info = info.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] = note: `#[warn(clippy::unnecessary_unwrap)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:124:35 [INFO] [stdout] | [INFO] [stdout] 124 | Jami::add_contact(&account_id, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:125:42 [INFO] [stdout] | [INFO] [stdout] 125 | Jami::send_trust_request(&account_id, &member, Vec::new() /* TODO */); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/app.rs:128:20 [INFO] [stdout] | [INFO] [stdout] 128 | if member.find("@") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `member.find("@").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] = note: `#[warn(clippy::partialeq_to_none)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:140:35 [INFO] [stdout] | [INFO] [stdout] 140 | Jami::lookup_name(&account_id, &ns, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:149:45 [INFO] [stdout] | [INFO] [stdout] 149 | .push(Message::info(String::from(format!("{}", account)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}", account)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] = note: `#[warn(clippy::useless_conversion)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:158:49 [INFO] [stdout] | [INFO] [stdout] 158 | ... .push(Message::info(String::from(format!("{}: {}", key, value)))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{}: {}", key, value)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to want to iterate on a map's keys [INFO] [stdout] --> src/app.rs:168:34 [INFO] [stdout] | [INFO] [stdout] 168 | for (key2, _) in &details { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#for_kv_map [INFO] [stdout] = note: `#[warn(clippy::for_kv_map)]` on by default [INFO] [stdout] help: use the corresponding method [INFO] [stdout] | [INFO] [stdout] 168 - for (key2, _) in &details { [INFO] [stdout] 168 + for key2 in details.keys() { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/app.rs:180:49 [INFO] [stdout] | [INFO] [stdout] 180 | let account = Jami::get_account(&*account_id); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] = note: `#[warn(clippy::explicit_auto_deref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/app.rs:203:34 [INFO] [stdout] | [INFO] [stdout] 203 | Jami::rm_account(&*account_id); [INFO] [stdout] | ^^^^^^^^^^^^ help: try: `&account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:255:42 [INFO] [stdout] | [INFO] [stdout] 255 | if Jami::rm_conversation(&account_id, &channel.id) { [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:265:51 [INFO] [stdout] | [INFO] [stdout] 265 | Jami::add_conversation_member(&account_id, &channel.id, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/app.rs:268:24 [INFO] [stdout] | [INFO] [stdout] 268 | if member.find("@") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `member.find("@").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:280:39 [INFO] [stdout] | [INFO] [stdout] 280 | Jami::lookup_name(&account_id, &ns, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:286:49 [INFO] [stdout] | [INFO] [stdout] 286 | Jami::update_conversation_infos(&account_id, &channel.id, infos); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:292:49 [INFO] [stdout] | [INFO] [stdout] 292 | Jami::update_conversation_infos(&account_id, &channel.id, infos); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:297:50 [INFO] [stdout] | [INFO] [stdout] 297 | Jami::rm_conversation_member(&account_id, &channel.id, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/app.rs:300:24 [INFO] [stdout] | [INFO] [stdout] 300 | if member.find("@") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `member.find("@").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:312:39 [INFO] [stdout] | [INFO] [stdout] 312 | Jami::lookup_name(&account_id, &ns, &member); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:348:48 [INFO] [stdout] | [INFO] [stdout] 348 | Jami::accept_file_transfer(&account_id, &channel.id, tid, &path); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:354:44 [INFO] [stdout] | [INFO] [stdout] 354 | Jami::cancel_file_transfer(&account_id, &channel.id, tid); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:389:49 [INFO] [stdout] | [INFO] [stdout] 389 | Jami::send_conversation_message(&account_id, &channel.id, &message, &String::new()); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:395:43 [INFO] [stdout] | [INFO] [stdout] 395 | Jami::decline_request(&account_id, &channel.id); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:397:49 [INFO] [stdout] | [INFO] [stdout] 397 | Jami::discard_trust_request(&account_id, &from_request); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:406:42 [INFO] [stdout] | [INFO] [stdout] 406 | Jami::accept_request(&account_id, &channel.id); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:411:48 [INFO] [stdout] | [INFO] [stdout] 411 | Jami::accept_trust_request(&account_id, &from_request); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:527:28 [INFO] [stdout] | [INFO] [stdout] 527 | if !info.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `info.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `info` after checking its variant with `is_none` [INFO] [stdout] --> src/app.rs:528:44 [INFO] [stdout] | [INFO] [stdout] 527 | if !info.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 528 | status = match info.unwrap().last_event { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:487:47 [INFO] [stdout] | [INFO] [stdout] 487 | ... .display_name(&payloads.get("invited").unwrap_or(&String::new())); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `payloads.get("invited").unwrap_or(&String::new())` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:488:47 [INFO] [stdout] | [INFO] [stdout] 488 | ... initial_message = String::from(format!( [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 489 | | ... "--> started a private conversation with {}", [INFO] [stdout] 490 | | ... uri [INFO] [stdout] 491 | | ... )); [INFO] [stdout] | |________________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] help: consider removing `String::from()` [INFO] [stdout] | [INFO] [stdout] 488 ~ initial_message = format!( [INFO] [stdout] 489 + "--> started a private conversation with {}", [INFO] [stdout] 490 + uri [INFO] [stdout] 491 ~ ); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `format!` [INFO] [stdout] --> src/app.rs:514:39 [INFO] [stdout] | [INFO] [stdout] 514 | ... message = format!("❌ Call missed"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.to_string()`: `"❌ Call missed".to_string()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_format [INFO] [stdout] = note: `#[warn(clippy::useless_format)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:518:29 [INFO] [stdout] | [INFO] [stdout] 518 | ... String::from(message), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:547:29 [INFO] [stdout] | [INFO] [stdout] 547 | ... String::from(message), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `message` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:569:33 [INFO] [stdout] | [INFO] [stdout] 569 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:576:33 [INFO] [stdout] | [INFO] [stdout] 576 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:583:33 [INFO] [stdout] | [INFO] [stdout] 583 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:590:33 [INFO] [stdout] | [INFO] [stdout] 590 | ... String::from(msg), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `msg` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:594:90 [INFO] [stdout] | [INFO] [stdout] 594 | channel.members = AppData::get_conversations_members(account_id, &conversation_id); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ help: change this to: `conversation_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/app.rs:601:29 [INFO] [stdout] | [INFO] [stdout] 601 | ... String::from(format!("{:?}", payloads)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("{:?}", payloads)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref which would be done by auto-deref [INFO] [stdout] --> src/app.rs:689:13 [INFO] [stdout] | [INFO] [stdout] 689 | &*format!("{}/profiles", account_id), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `&format!("{}/profiles", account_id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_auto_deref [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: deref on an immutable reference [INFO] [stdout] --> src/app.rs:695:72 [INFO] [stdout] | [INFO] [stdout] 695 | let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(&*from)); [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_deref_ref [INFO] [stdout] = note: `#[warn(clippy::borrow_deref_ref)]` on by default [INFO] [stdout] help: if you would like to reborrow, try removing `&*` [INFO] [stdout] | [INFO] [stdout] 695 - let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(&*from)); [INFO] [stdout] 695 + let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(from)); [INFO] [stdout] | [INFO] [stdout] help: if you would like to deref, try using `&**` [INFO] [stdout] | [INFO] [stdout] 695 | let dest = format!("{}/{}.vcf", dest.unwrap(), &base64::encode(&**from)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:701:27 [INFO] [stdout] | [INFO] [stdout] 701 | Jami::lookup_name(&account_id, &String::new(), &from); [INFO] [stdout] | ^^^^^^^^^^^ help: change this to: `account_id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:701:56 [INFO] [stdout] | [INFO] [stdout] 701 | Jami::lookup_name(&account_id, &String::new(), &from); [INFO] [stdout] | ^^^^^ help: change this to: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/app.rs:735:12 [INFO] [stdout] | [INFO] [stdout] 735 | if !info.is_none() { [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: try: `info.is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `info` after checking its variant with `is_none` [INFO] [stdout] --> src/app.rs:736:24 [INFO] [stdout] | [INFO] [stdout] 735 | if !info.is_none() { [INFO] [stdout] | -------------- the check is happening here [INFO] [stdout] 736 | let info = info.unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: try using `match` [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: you seem to be trying to use `match` for an equality check. Consider using `if` [INFO] [stdout] --> src/app.rs:737:13 [INFO] [stdout] | [INFO] [stdout] 737 | / ... match self.data.transfer_manager.path(account_id.clone(), conversation_id.clone(), tid.to_string()) { [INFO] [stdout] 738 | | ... None => { [INFO] [stdout] 739 | | ... if info.flags == 0 /* outgoing */ { [INFO] [stdout] 740 | | ... self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] ... | [INFO] [stdout] 745 | | ... _ => {}, [INFO] [stdout] 746 | | ... }; [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_match [INFO] [stdout] = note: `#[warn(clippy::single_match)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 737 ~ if self.data.transfer_manager.path(account_id.clone(), conversation_id.clone(), tid.to_string()) == None { [INFO] [stdout] 738 + if info.flags == 0 /* outgoing */ { [INFO] [stdout] 739 + self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 740 + } else if status == 6 /* Finished */ { [INFO] [stdout] 741 + self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 742 + } [INFO] [stdout] 743 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` has identical blocks [INFO] [stdout] --> src/app.rs:739:55 [INFO] [stdout] | [INFO] [stdout] 739 | ... if info.flags == 0 /* outgoing */ { [INFO] [stdout] | _________________________________________^ [INFO] [stdout] 740 | | ... self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 741 | | ... } else if status == 6 /* Finished */ { [INFO] [stdout] | |_______^ [INFO] [stdout] | [INFO] [stdout] note: same as this [INFO] [stdout] --> src/app.rs:741:58 [INFO] [stdout] | [INFO] [stdout] 741 | ... } else if status == 6 /* Finished */ { [INFO] [stdout] | ____________________________________________^ [INFO] [stdout] 742 | | ... self.data.transfer_manager.set_file_path(account_id.clone(), conversation_id.clone(), tid.to_string(), info.path); [INFO] [stdout] 743 | | ... } [INFO] [stdout] | |_______^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_same_then_else [INFO] [stdout] = note: `#[warn(clippy::if_same_then_else)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: taken reference of right operand [INFO] [stdout] --> src/app.rs:749:16 [INFO] [stdout] | [INFO] [stdout] 749 | if account_id == &*self.data.account.id { [INFO] [stdout] | ^^^^^^^^^^^^^^---------------------- [INFO] [stdout] | | [INFO] [stdout] | help: use the right value directly: `*self.data.account.id` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#op_ref [INFO] [stdout] = note: `#[warn(clippy::op_ref)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/app.rs:861:36 [INFO] [stdout] | [INFO] [stdout] 861 | .push(Channel::new(&from, ChannelType::TrustRequest(from.clone()))); [INFO] [stdout] | ^^^^^ help: change this to: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: use of `unwrap_or` to construct default value [INFO] [stdout] --> src/app.rs:903:69 [INFO] [stdout] | [INFO] [stdout] 903 | if channel.id == out_invite.channel.clone().unwrap_or(String::new()) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default [INFO] [stdout] = note: `#[warn(clippy::unwrap_or_default)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: called `unwrap` on `file` after checking its variant with `is_ok` [INFO] [stdout] --> src/appdata.rs:52:44 [INFO] [stdout] | [INFO] [stdout] 51 | if file.is_ok() { [INFO] [stdout] | --------------- help: try: `if let Ok() = file` [INFO] [stdout] 52 | for line in io::BufReader::new(file.unwrap()).lines() { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_unwrap [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/appdata.rs:55:21 [INFO] [stdout] | [INFO] [stdout] 55 | String::from(line.unwrap()), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `line.unwrap()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/appdata.rs:100:65 [INFO] [stdout] | [INFO] [stdout] 100 | let members_from_daemon = Jami::get_members(account_id, &conversation); [INFO] [stdout] | ^^^^^^^^^^^^^ help: change this to: `conversation` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/appdata.rs:104:16 [INFO] [stdout] | [INFO] [stdout] 104 | if member["role"].to_string() == "admin" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `member["role"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] = note: `#[warn(clippy::cmp_owned)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this creates an owned instance just for comparison [INFO] [stdout] --> src/appdata.rs:106:23 [INFO] [stdout] | [INFO] [stdout] 106 | } else if member["role"].to_string() == "invited" { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `member["role"]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#cmp_owned [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manual implementation of `.is_multiple_of()` [INFO] [stdout] --> src/ui.rs:89:61 [INFO] [stdout] | [INFO] [stdout] 89 | let extra_cursor_line = if app.data.input_cursor > 0 && app.data.input_cursor % text_width == 0 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace with: `app.data.input_cursor.is_multiple_of(text_width)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_is_multiple_of [INFO] [stdout] = note: `#[warn(clippy::manual_is_multiple_of)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:167:34 [INFO] [stdout] | [INFO] [stdout] 167 | textwrap::indent(&from, &" ".repeat(max_username_width - from.width())), [INFO] [stdout] | ^^^^^ help: change this to: `from` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/ui.rs:288:25 [INFO] [stdout] | [INFO] [stdout] 288 | let space_pos = name.find(' ').unwrap_or_else(|| name.len()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_lazy_evaluations [INFO] [stdout] = note: `#[warn(clippy::unnecessary_lazy_evaluations)]` on by default [INFO] [stdout] help: use `unwrap_or` instead [INFO] [stdout] | [INFO] [stdout] 288 - let space_pos = name.find(' ').unwrap_or_else(|| name.len()); [INFO] [stdout] 288 + let space_pos = name.find(' ').unwrap_or(name.len()); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/ui.rs:291:9 [INFO] [stdout] | [INFO] [stdout] 291 | &name [INFO] [stdout] | ^^^^^ help: change this to: `name` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: writing `&String` instead of `&str` involves a new object where a slice will do [INFO] [stdout] --> src/util.rs:59:20 [INFO] [stdout] | [INFO] [stdout] 59 | pub fn new(id: &String, channel_type: ChannelType) -> Channel { [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg [INFO] [stdout] = note: `#[warn(clippy::ptr_arg)]` on by default [INFO] [stdout] help: change this to [INFO] [stdout] | [INFO] [stdout] 59 ~ pub fn new(id: &str, channel_type: ChannelType) -> Channel { [INFO] [stdout] 60 | Channel { [INFO] [stdout] 61 ~ id: id.to_owned(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/util.rs:89:9 [INFO] [stdout] | [INFO] [stdout] 89 | return name; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] = note: `#[warn(clippy::needless_return)]` on by default [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 89 - return name; [INFO] [stdout] 89 + name [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/util.rs:82:24 [INFO] [stdout] | [INFO] [stdout] 82 | name = String::from(format!("🔵 {}", self.id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("🔵 {}", self.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless conversion to the same type: `std::string::String` [INFO] [stdout] --> src/util.rs:85:24 [INFO] [stdout] | [INFO] [stdout] 85 | name = String::from(format!("🟠 {}", self.id)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider removing `String::from()`: `format!("🟠 {}", self.id)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/util.rs:98:12 [INFO] [stdout] | [INFO] [stdout] 98 | if infos.get("title") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `infos.get("title").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: binary comparison to literal `Option::None` [INFO] [stdout] --> src/util.rs:101:12 [INFO] [stdout] | [INFO] [stdout] 101 | if infos.get("description") != None { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `Option::is_some()` instead: `infos.get("description").is_some()` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#partialeq_to_none [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 36.62s [INFO] running `Command { std: "docker" "inspect" "719ff1d15adaf0c3b5fef1532794659e29ea3e56b21ea4143707aec8fe4dc0ec", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "719ff1d15adaf0c3b5fef1532794659e29ea3e56b21ea4143707aec8fe4dc0ec", kill_on_drop: false }` [INFO] [stdout] 719ff1d15adaf0c3b5fef1532794659e29ea3e56b21ea4143707aec8fe4dc0ec