[INFO] cloning repository https://github.com/Skiftsu/BackupNF [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Skiftsu/BackupNF" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSkiftsu%2FBackupNF", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSkiftsu%2FBackupNF'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 9237030aa753bca63e7a56c3daf82dc181469a4a [INFO] linting Skiftsu/BackupNF against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FSkiftsu%2FBackupNF" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/Skiftsu/BackupNF [INFO] finished tweaking git repo https://github.com/Skiftsu/BackupNF [INFO] tweaked toml for git repo https://github.com/Skiftsu/BackupNF written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/Skiftsu/BackupNF on toolchain nightly [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+nightly" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/Skiftsu/BackupNF 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] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded strum v0.26.1 [INFO] [stderr] Downloaded indoc v2.0.4 [INFO] [stderr] Downloaded toml_edit v0.22.6 [INFO] [stderr] Downloaded strum_macros v0.26.1 [INFO] [stderr] Downloaded toml v0.8.10 [INFO] [stderr] Downloaded tui-textarea v0.4.0 [INFO] [stderr] Downloaded stability v0.1.1 [INFO] [stderr] Downloaded ratatui v0.26.1 [INFO] [stderr] Downloaded winnow v0.6.2 [INFO] [stderr] Downloaded syn v2.0.51 [INFO] [stderr] Downloaded ratatui-explorer v0.1.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] 897cce2afc23053290df1224b369194549847effbd033f6549094087bb17b9f2 [INFO] running `Command { std: "docker" "start" "-a" "897cce2afc23053290df1224b369194549847effbd033f6549094087bb17b9f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "897cce2afc23053290df1224b369194549847effbd033f6549094087bb17b9f2", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "897cce2afc23053290df1224b369194549847effbd033f6549094087bb17b9f2", kill_on_drop: false }` [INFO] [stdout] 897cce2afc23053290df1224b369194549847effbd033f6549094087bb17b9f2 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-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] ef471991da518f4391ba1921ba090a0782e5c9c99fc82efb2ff96892708e79ca [INFO] running `Command { std: "docker" "start" "-a" "ef471991da518f4391ba1921ba090a0782e5c9c99fc82efb2ff96892708e79ca", kill_on_drop: false }` [INFO] [stderr] Checking once_cell v1.19.0 [INFO] [stderr] Compiling signal-hook v0.3.17 [INFO] [stderr] Compiling syn v1.0.109 [INFO] [stderr] Checking log v0.4.20 [INFO] [stderr] Compiling ahash v0.8.9 [INFO] [stderr] Compiling serde v1.0.197 [INFO] [stderr] Checking bitflags v2.4.2 [INFO] [stderr] Checking either v1.10.0 [INFO] [stderr] Checking ryu v1.0.17 [INFO] [stderr] Compiling indoc v2.0.4 [INFO] [stderr] Compiling syn v2.0.51 [INFO] [stderr] Checking parking_lot_core v0.9.9 [INFO] [stderr] Checking castaway v0.2.2 [INFO] [stderr] Checking unicode-segmentation v1.11.0 [INFO] [stderr] Checking cassowary v0.3.0 [INFO] [stderr] Checking winnow v0.6.2 [INFO] [stderr] Checking mio v0.8.10 [INFO] [stderr] Checking compact_str v0.7.1 [INFO] [stderr] Checking itertools v0.12.1 [INFO] [stderr] Checking parking_lot v0.12.1 [INFO] [stderr] Checking hashbrown v0.14.3 [INFO] [stderr] Checking signal-hook-mio v0.2.3 [INFO] [stderr] Checking crossterm v0.27.0 [INFO] [stderr] Checking lru v0.12.3 [INFO] [stderr] Checking indexmap v2.2.3 [INFO] [stderr] Compiling serde_derive v1.0.197 [INFO] [stderr] Compiling strum_macros v0.26.1 [INFO] [stderr] Checking strum v0.26.1 [INFO] [stderr] Compiling stability v0.1.1 [INFO] [stderr] Compiling derivative v2.2.0 [INFO] [stderr] Checking ratatui v0.26.1 [INFO] [stderr] Checking tui-textarea v0.4.0 [INFO] [stderr] Checking ratatui-explorer v0.1.1 [INFO] [stderr] Checking toml_datetime v0.6.5 [INFO] [stderr] Checking serde_spanned v0.6.5 [INFO] [stderr] Checking toml_edit v0.22.6 [INFO] [stderr] Checking toml v0.8.10 [INFO] [stderr] Checking backup-nf v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `PathBuf` [INFO] [stdout] --> src/backup_service.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use toml; [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: redundant field names in struct initialization [INFO] [stdout] --> src/ui/backup.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/backup.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/backup_config.rs:133:25 [INFO] [stdout] | [INFO] [stdout] 133 | path: path, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/recovery.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/recovery.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `PathBuf` [INFO] [stdout] --> src/backup_service.rs:1:23 [INFO] [stdout] | [INFO] [stdout] 1 | use std::path::{Path, PathBuf}; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/config.rs:3:1 [INFO] [stdout] | [INFO] [stdout] 3 | use toml; [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: redundant field names in struct initialization [INFO] [stdout] --> src/ui/backup.rs:232:9 [INFO] [stdout] | [INFO] [stdout] 232 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] = note: `#[warn(clippy::redundant_field_names)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/backup.rs:233:9 [INFO] [stdout] | [INFO] [stdout] 233 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/backup_config.rs:133:25 [INFO] [stdout] | [INFO] [stdout] 133 | path: path, [INFO] [stdout] | ^^^^^^^^^^ help: replace it with: `path` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/recovery.rs:195:9 [INFO] [stdout] | [INFO] [stdout] 195 | width: width, [INFO] [stdout] | ^^^^^^^^^^^^ help: replace it with: `width` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant field names in struct initialization [INFO] [stdout] --> src/ui/recovery.rs:196:9 [INFO] [stdout] | [INFO] [stdout] 196 | height: height, [INFO] [stdout] | ^^^^^^^^^^^^^^ help: replace it with: `height` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `app` [INFO] [stdout] --> src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let app = App::new(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_app` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/backup_service.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | backup_folder.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `backup_folder.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/backup.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | / Ok(while working { [INFO] [stdout] 62 | | terminal.borrow_mut().draw(|f| { [INFO] [stdout] 63 | | ui(f, &backup); [INFO] [stdout] 64 | | if enter_text { [INFO] [stdout] ... | [INFO] [stdout] 130 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 61 ~ let _: () = while working { [INFO] [stdout] 62 + terminal.borrow_mut().draw(|f| { [INFO] [stdout] 63 + ui(f, &backup); [INFO] [stdout] 64 + if enter_text { [INFO] [stdout] 65 + let (_end, _save) = enter_folder_name(f, &mut textarea); [INFO] [stdout] 66 + if _end { [INFO] [stdout] 67 + enter_text = false; [INFO] [stdout] 68 + } [INFO] [stdout] 69 + [INFO] [stdout] 70 + if _save { [INFO] [stdout] 71 + backup.folder_name = textarea.lines()[0].clone(); [INFO] [stdout] 72 + } [INFO] [stdout] 73 + } else { [INFO] [stdout] 74 + if show_error { [INFO] [stdout] 75 + if ui_error( [INFO] [stdout] 76 + f, [INFO] [stdout] 77 ~ "Не указано имя папки, папка или в конфиге нету элементов".to_string(), [INFO] [stdout] 78 + "Close(ESC)".to_string(), [INFO] [stdout] 79 + ) { [INFO] [stdout] 80 + show_error = false [INFO] [stdout] 81 + } [INFO] [stdout] 82 + } [INFO] [stdout] 83 + } [INFO] [stdout] 84 + })?; [INFO] [stdout] 85 + if !enter_text && !show_error { [INFO] [stdout] 86 + let callback = |key: KeyCode| { [INFO] [stdout] 87 + if key == KeyCode::Char('q') [INFO] [stdout] 88 + || key == KeyCode::Char('Q') [INFO] [stdout] 89 ~ || key == KeyCode::Char('й') [INFO] [stdout] 90 ~ || key == KeyCode::Char('Й') [INFO] [stdout] 91 + { [INFO] [stdout] 92 + working = false; [INFO] [stdout] 93 + } [INFO] [stdout] 94 + if key == KeyCode::Char('n') [INFO] [stdout] 95 + || key == KeyCode::Char('N') [INFO] [stdout] 96 ~ || key == KeyCode::Char('т') [INFO] [stdout] 97 ~ || key == KeyCode::Char('Т') [INFO] [stdout] 98 + { [INFO] [stdout] 99 + enter_text = true; [INFO] [stdout] 100 + } [INFO] [stdout] 101 + [INFO] [stdout] 102 + if key == KeyCode::Char('F') [INFO] [stdout] 103 + || key == KeyCode::Char('f') [INFO] [stdout] 104 ~ || key == KeyCode::Char('а') [INFO] [stdout] 105 ~ || key == KeyCode::Char('А') [INFO] [stdout] 106 + { [INFO] [stdout] 107 + let callback = [INFO] [stdout] 108 + |path: String, _element_type: EElementType| backup.folder_path = path; [INFO] [stdout] 109 + file_picker::start(terminal, callback, EElementType::Folder).unwrap(); [INFO] [stdout] 110 + } [INFO] [stdout] 111 + [INFO] [stdout] 112 ~ if key == KeyCode::Char('Ы') [INFO] [stdout] 113 ~ || key == KeyCode::Char('ы') [INFO] [stdout] 114 + || key == KeyCode::Char('S') [INFO] [stdout] 115 + || key == KeyCode::Char('s') [INFO] [stdout] 116 + { [INFO] [stdout] 117 + if backup.folder_name.is_empty() [INFO] [stdout] 118 + || backup.folder_path.is_empty() [INFO] [stdout] 119 + || config.elements.is_empty() [INFO] [stdout] 120 + { [INFO] [stdout] 121 + show_error = true; [INFO] [stdout] 122 + } else { [INFO] [stdout] 123 + start_backup(&config, &backup); [INFO] [stdout] 124 + } [INFO] [stdout] 125 + } [INFO] [stdout] 126 + }; [INFO] [stdout] 127 + [INFO] [stdout] 128 + handle_evnets(callback); [INFO] [stdout] 129 + } [INFO] [stdout] 130 + }; [INFO] [stdout] 131 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/backup.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | / if show_error { [INFO] [stdout] 75 | | if ui_error( [INFO] [stdout] 76 | | f, [INFO] [stdout] 77 | | "Не указано имя папки, папка или в конфиге нету элементов".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 74 ~ if show_error [INFO] [stdout] 75 ~ && ui_error( [INFO] [stdout] 76 | f, [INFO] [stdout] ... [INFO] [stdout] 80 | show_error = false [INFO] [stdout] 81 ~ } [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/backup.rs:123:38 [INFO] [stdout] | [INFO] [stdout] 123 | start_backup(&config, &backup); [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [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: unused variable: `app` [INFO] [stdout] --> src/main.rs:58:9 [INFO] [stdout] | [INFO] [stdout] 58 | let app = App::new(); [INFO] [stdout] | ^^^ help: if this is intentional, prefix it with an underscore: `_app` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ui/backup.rs:225:5 [INFO] [stdout] | [INFO] [stdout] 225 | return (false, false); [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] 225 - return (false, false); [INFO] [stdout] 225 + (false, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ui/backup.rs:265:5 [INFO] [stdout] | [INFO] [stdout] 265 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 265 - return false; [INFO] [stdout] 265 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ui/backup_config.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 58 | if !(self.current_element == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.current_element != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: calling `push_str()` using a single-character string literal [INFO] [stdout] --> src/backup_service.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | backup_folder.push_str("/"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `push` with a character literal: `backup_folder.push('/')` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_char_add_str [INFO] [stdout] = note: `#[warn(clippy::single_char_add_str)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/backup_config.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | / Ok(while working { [INFO] [stdout] 81 | | terminal [INFO] [stdout] 82 | | .borrow_mut() [INFO] [stdout] 83 | | .draw(|f| ui(f, &backup_config)) [INFO] [stdout] ... | [INFO] [stdout] 170 | | handle_evnets(&mut callback); [INFO] [stdout] 171 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 80 ~ let _: () = while working { [INFO] [stdout] 81 + terminal [INFO] [stdout] 82 + .borrow_mut() [INFO] [stdout] 83 + .draw(|f| ui(f, &backup_config)) [INFO] [stdout] 84 + .unwrap(); [INFO] [stdout] 85 + let mut callback = |key: KeyCode| { [INFO] [stdout] 86 + if key == KeyCode::Char('q') [INFO] [stdout] 87 + || key == KeyCode::Char('Q') [INFO] [stdout] 88 ~ || key == KeyCode::Char('й') [INFO] [stdout] 89 ~ || key == KeyCode::Char('Й') [INFO] [stdout] 90 + { [INFO] [stdout] 91 + working = false; [INFO] [stdout] 92 + } [INFO] [stdout] 93 + [INFO] [stdout] 94 + if key == KeyCode::Char('b') [INFO] [stdout] 95 + || key == KeyCode::Char('B') [INFO] [stdout] 96 ~ || key == KeyCode::Char('И') [INFO] [stdout] 97 ~ || key == KeyCode::Char('и') [INFO] [stdout] 98 + { [INFO] [stdout] 99 + start_backup(&backup_config.borrow().backup_config) [INFO] [stdout] 100 + } [INFO] [stdout] 101 + [INFO] [stdout] 102 + if key == KeyCode::Down { [INFO] [stdout] 103 + backup_config.borrow_mut().next() [INFO] [stdout] 104 + } [INFO] [stdout] 105 + [INFO] [stdout] 106 + if key == KeyCode::Up { [INFO] [stdout] 107 + backup_config.borrow_mut().previous() [INFO] [stdout] 108 + } [INFO] [stdout] 109 + [INFO] [stdout] 110 + if key == KeyCode::Char('r') [INFO] [stdout] 111 + || key == KeyCode::Char('R') [INFO] [stdout] 112 ~ || key == KeyCode::Char('К') [INFO] [stdout] 113 ~ || key == KeyCode::Char('к') [INFO] [stdout] 114 + { [INFO] [stdout] 115 + backup_config.borrow_mut().remove_current(); [INFO] [stdout] 116 + } [INFO] [stdout] 117 + [INFO] [stdout] 118 + if key == KeyCode::Char('C') [INFO] [stdout] 119 + || key == KeyCode::Char('c') [INFO] [stdout] 120 ~ || key == KeyCode::Char('с') [INFO] [stdout] 121 ~ || key == KeyCode::Char('С') [INFO] [stdout] 122 + { [INFO] [stdout] 123 + backup_config.borrow_mut().clear_all(); [INFO] [stdout] 124 + } [INFO] [stdout] 125 + [INFO] [stdout] 126 ~ if key == KeyCode::Char('ф') [INFO] [stdout] 127 ~ || key == KeyCode::Char('Ф') [INFO] [stdout] 128 + || key == KeyCode::Char('A') [INFO] [stdout] 129 + || key == KeyCode::Char('a') [INFO] [stdout] 130 + { [INFO] [stdout] 131 + let callback = |path: String, element_type: EElementType| { [INFO] [stdout] 132 + backup_config.borrow_mut().add_new(SConfigElement { [INFO] [stdout] 133 + path: path, [INFO] [stdout] 134 + content_type: element_type, [INFO] [stdout] 135 + }) [INFO] [stdout] 136 + }; [INFO] [stdout] 137 + let _ = file_picker::start(terminal, callback, EElementType::Anything); [INFO] [stdout] 138 + } [INFO] [stdout] 139 + [INFO] [stdout] 140 + if key == KeyCode::Char('L') [INFO] [stdout] 141 + || key == KeyCode::Char('l') [INFO] [stdout] 142 ~ || key == KeyCode::Char('д') [INFO] [stdout] 143 ~ || key == KeyCode::Char('Д') [INFO] [stdout] 144 + { [INFO] [stdout] 145 + let callback = |path: String, _element_type: EElementType| { [INFO] [stdout] 146 + backup_config.borrow_mut().backup_config.path = path.clone(); [INFO] [stdout] 147 + backup_config.borrow_mut().backup_config.load_config(path); [INFO] [stdout] 148 + }; [INFO] [stdout] 149 + let _ = file_picker::start(terminal, callback, EElementType::File); [INFO] [stdout] 150 + } [INFO] [stdout] 151 + [INFO] [stdout] 152 ~ if key == KeyCode::Char('ы') [INFO] [stdout] 153 ~ || key == KeyCode::Char('Ы') [INFO] [stdout] 154 + || key == KeyCode::Char('s') [INFO] [stdout] 155 + || key == KeyCode::Char('S') [INFO] [stdout] 156 + { [INFO] [stdout] 157 + if backup_config.borrow().backup_config.path.is_empty() { [INFO] [stdout] 158 + let callback = |path: String, _element_type: EElementType| { [INFO] [stdout] 159 + backup_config.borrow_mut().backup_config.auto_save(path); [INFO] [stdout] 160 + }; [INFO] [stdout] 161 + let _ = file_picker::start(terminal, callback, EElementType::Folder); [INFO] [stdout] 162 + } else { [INFO] [stdout] 163 + backup_config [INFO] [stdout] 164 + .borrow_mut() [INFO] [stdout] 165 + .backup_config [INFO] [stdout] 166 + .auto_save(String::new()); [INFO] [stdout] 167 + } [INFO] [stdout] 168 + } [INFO] [stdout] 169 + }; [INFO] [stdout] 170 + handle_evnets(&mut callback); [INFO] [stdout] 171 + }; [INFO] [stdout] 172 + Ok(()) [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/backup_config.rs:281:13 [INFO] [stdout] | [INFO] [stdout] 281 | &config_element, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `config_element` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/ui/backup_config.rs:303:5 [INFO] [stdout] | [INFO] [stdout] 303 | let type_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `type_text` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 303 ~ [INFO] [stdout] 304 ~ let type_text: String = match unit.content_type { [INFO] [stdout] 305 ~ EElementType::File => "File".to_string(), [INFO] [stdout] 306 ~ EElementType::Folder => "Folder".to_string(), [INFO] [stdout] 307 ~ EElementType::Anything => "ERROR".to_string(), [INFO] [stdout] 308 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/file_picker.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / Ok(while working { [INFO] [stdout] 22 | | terminal.borrow_mut().draw(|f| { [INFO] [stdout] 23 | | f.render_widget(&file_explorer.widget(), f.size()); [INFO] [stdout] 24 | | })?; [INFO] [stdout] ... | [INFO] [stdout] 50 | | file_explorer.handle(&event)?; [INFO] [stdout] 51 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 21 ~ let _: () = while working { [INFO] [stdout] 22 + terminal.borrow_mut().draw(|f| { [INFO] [stdout] 23 + f.render_widget(&file_explorer.widget(), f.size()); [INFO] [stdout] 24 + })?; [INFO] [stdout] 25 + [INFO] [stdout] 26 + let event = read()?; [INFO] [stdout] 27 + if let Event::Key(key) = event { [INFO] [stdout] 28 + if key.code == KeyCode::Char('q') { [INFO] [stdout] 29 + break; [INFO] [stdout] 30 + } [INFO] [stdout] 31 + if key.code == KeyCode::Enter { [INFO] [stdout] 32 + let current_path = file_explorer.current().path(); [INFO] [stdout] 33 + [INFO] [stdout] 34 + let mut element_type = EElementType::Anything; [INFO] [stdout] 35 + if current_path.is_file() { [INFO] [stdout] 36 + element_type = EElementType::File [INFO] [stdout] 37 + } else if current_path.is_dir() { [INFO] [stdout] 38 + element_type = EElementType::Folder [INFO] [stdout] 39 + } [INFO] [stdout] 40 + [INFO] [stdout] 41 + if requested_type != EElementType::Anything && requested_type != element_type { [INFO] [stdout] 42 + continue; [INFO] [stdout] 43 + } [INFO] [stdout] 44 + [INFO] [stdout] 45 + fn_select(current_path.to_string_lossy().to_string(), element_type); [INFO] [stdout] 46 + working = false; [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] 49 + [INFO] [stdout] 50 + file_explorer.handle(&event)?; [INFO] [stdout] 51 + }; [INFO] [stdout] 52 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/menu.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / Ok(while working { [INFO] [stdout] 41 | | terminal.borrow_mut().draw(|f| ui(f, &menu))?; [INFO] [stdout] 42 | | let (_close, _result) = handle_evnets(&mut menu, &mut select_fn).unwrap(); [INFO] [stdout] 43 | | working = !_close; [INFO] [stdout] 44 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 40 ~ let _: () = while working { [INFO] [stdout] 41 + terminal.borrow_mut().draw(|f| ui(f, &menu))?; [INFO] [stdout] 42 + let (_close, _result) = handle_evnets(&mut menu, &mut select_fn).unwrap(); [INFO] [stdout] 43 + working = !_close; [INFO] [stdout] 44 + }; [INFO] [stdout] 45 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/recovery.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / Ok(while working { [INFO] [stdout] 49 | | terminal.borrow_mut().draw(|f| ui(f, &recovery))?; [INFO] [stdout] 50 | | let (_close, _result) = [INFO] [stdout] 51 | | handle_events(&mut start_recovery, &mut recovery, terminal).unwrap(); [INFO] [stdout] 52 | | working = !_close; [INFO] [stdout] 53 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 48 ~ let _: () = while working { [INFO] [stdout] 49 + terminal.borrow_mut().draw(|f| ui(f, &recovery))?; [INFO] [stdout] 50 + let (_close, _result) = [INFO] [stdout] 51 + handle_events(&mut start_recovery, &mut recovery, terminal).unwrap(); [INFO] [stdout] 52 + working = !_close; [INFO] [stdout] 53 + }; [INFO] [stdout] 54 + Ok(()) [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/recovery.rs:153:32 [INFO] [stdout] | [INFO] [stdout] 153 | start_recovery(&recovery) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `recovery` [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: passing a unit value to a function [INFO] [stdout] --> src/ui/backup.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | / Ok(while working { [INFO] [stdout] 62 | | terminal.borrow_mut().draw(|f| { [INFO] [stdout] 63 | | ui(f, &backup); [INFO] [stdout] 64 | | if enter_text { [INFO] [stdout] ... | [INFO] [stdout] 130 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] = note: `#[warn(clippy::unit_arg)]` on by default [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 61 ~ let _: () = while working { [INFO] [stdout] 62 + terminal.borrow_mut().draw(|f| { [INFO] [stdout] 63 + ui(f, &backup); [INFO] [stdout] 64 + if enter_text { [INFO] [stdout] 65 + let (_end, _save) = enter_folder_name(f, &mut textarea); [INFO] [stdout] 66 + if _end { [INFO] [stdout] 67 + enter_text = false; [INFO] [stdout] 68 + } [INFO] [stdout] 69 + [INFO] [stdout] 70 + if _save { [INFO] [stdout] 71 + backup.folder_name = textarea.lines()[0].clone(); [INFO] [stdout] 72 + } [INFO] [stdout] 73 + } else { [INFO] [stdout] 74 + if show_error { [INFO] [stdout] 75 + if ui_error( [INFO] [stdout] 76 + f, [INFO] [stdout] 77 ~ "Не указано имя папки, папка или в конфиге нету элементов".to_string(), [INFO] [stdout] 78 + "Close(ESC)".to_string(), [INFO] [stdout] 79 + ) { [INFO] [stdout] 80 + show_error = false [INFO] [stdout] 81 + } [INFO] [stdout] 82 + } [INFO] [stdout] 83 + } [INFO] [stdout] 84 + })?; [INFO] [stdout] 85 + if !enter_text && !show_error { [INFO] [stdout] 86 + let callback = |key: KeyCode| { [INFO] [stdout] 87 + if key == KeyCode::Char('q') [INFO] [stdout] 88 + || key == KeyCode::Char('Q') [INFO] [stdout] 89 ~ || key == KeyCode::Char('й') [INFO] [stdout] 90 ~ || key == KeyCode::Char('Й') [INFO] [stdout] 91 + { [INFO] [stdout] 92 + working = false; [INFO] [stdout] 93 + } [INFO] [stdout] 94 + if key == KeyCode::Char('n') [INFO] [stdout] 95 + || key == KeyCode::Char('N') [INFO] [stdout] 96 ~ || key == KeyCode::Char('т') [INFO] [stdout] 97 ~ || key == KeyCode::Char('Т') [INFO] [stdout] 98 + { [INFO] [stdout] 99 + enter_text = true; [INFO] [stdout] 100 + } [INFO] [stdout] 101 + [INFO] [stdout] 102 + if key == KeyCode::Char('F') [INFO] [stdout] 103 + || key == KeyCode::Char('f') [INFO] [stdout] 104 ~ || key == KeyCode::Char('а') [INFO] [stdout] 105 ~ || key == KeyCode::Char('А') [INFO] [stdout] 106 + { [INFO] [stdout] 107 + let callback = [INFO] [stdout] 108 + |path: String, _element_type: EElementType| backup.folder_path = path; [INFO] [stdout] 109 + file_picker::start(terminal, callback, EElementType::Folder).unwrap(); [INFO] [stdout] 110 + } [INFO] [stdout] 111 + [INFO] [stdout] 112 ~ if key == KeyCode::Char('Ы') [INFO] [stdout] 113 ~ || key == KeyCode::Char('ы') [INFO] [stdout] 114 + || key == KeyCode::Char('S') [INFO] [stdout] 115 + || key == KeyCode::Char('s') [INFO] [stdout] 116 + { [INFO] [stdout] 117 + if backup.folder_name.is_empty() [INFO] [stdout] 118 + || backup.folder_path.is_empty() [INFO] [stdout] 119 + || config.elements.is_empty() [INFO] [stdout] 120 + { [INFO] [stdout] 121 + show_error = true; [INFO] [stdout] 122 + } else { [INFO] [stdout] 123 + start_backup(&config, &backup); [INFO] [stdout] 124 + } [INFO] [stdout] 125 + } [INFO] [stdout] 126 + }; [INFO] [stdout] 127 + [INFO] [stdout] 128 + handle_evnets(callback); [INFO] [stdout] 129 + } [INFO] [stdout] 130 + }; [INFO] [stdout] 131 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` statement can be collapsed [INFO] [stdout] --> src/ui/backup.rs:74:17 [INFO] [stdout] | [INFO] [stdout] 74 | / if show_error { [INFO] [stdout] 75 | | if ui_error( [INFO] [stdout] 76 | | f, [INFO] [stdout] 77 | | "Не указано имя папки, папка или в конфиге нету элементов".to_string(), [INFO] [stdout] ... | [INFO] [stdout] 82 | | } [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if [INFO] [stdout] = note: `#[warn(clippy::collapsible_if)]` on by default [INFO] [stdout] help: collapse nested if block [INFO] [stdout] | [INFO] [stdout] 74 ~ if show_error [INFO] [stdout] 75 ~ && ui_error( [INFO] [stdout] 76 | f, [INFO] [stdout] ... [INFO] [stdout] 80 | show_error = false [INFO] [stdout] 81 ~ } [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/backup.rs:123:38 [INFO] [stdout] | [INFO] [stdout] 123 | start_backup(&config, &backup); [INFO] [stdout] | ^^^^^^^ help: change this to: `config` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] = note: `#[warn(clippy::needless_borrow)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ui/backup.rs:225:5 [INFO] [stdout] | [INFO] [stdout] 225 | return (false, false); [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] 225 - return (false, false); [INFO] [stdout] 225 + (false, false) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded `return` statement [INFO] [stdout] --> src/ui/backup.rs:265:5 [INFO] [stdout] | [INFO] [stdout] 265 | return false; [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return [INFO] [stdout] help: remove `return` [INFO] [stdout] | [INFO] [stdout] 265 - return false; [INFO] [stdout] 265 + false [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/ui/backup_config.rs:58:12 [INFO] [stdout] | [INFO] [stdout] 58 | if !(self.current_element == 0) { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `(self.current_element != 0)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#nonminimal_bool [INFO] [stdout] = note: `#[warn(clippy::nonminimal_bool)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/backup_config.rs:80:5 [INFO] [stdout] | [INFO] [stdout] 80 | / Ok(while working { [INFO] [stdout] 81 | | terminal [INFO] [stdout] 82 | | .borrow_mut() [INFO] [stdout] 83 | | .draw(|f| ui(f, &backup_config)) [INFO] [stdout] ... | [INFO] [stdout] 170 | | handle_evnets(&mut callback); [INFO] [stdout] 171 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 80 ~ let _: () = while working { [INFO] [stdout] 81 + terminal [INFO] [stdout] 82 + .borrow_mut() [INFO] [stdout] 83 + .draw(|f| ui(f, &backup_config)) [INFO] [stdout] 84 + .unwrap(); [INFO] [stdout] 85 + let mut callback = |key: KeyCode| { [INFO] [stdout] 86 + if key == KeyCode::Char('q') [INFO] [stdout] 87 + || key == KeyCode::Char('Q') [INFO] [stdout] 88 ~ || key == KeyCode::Char('й') [INFO] [stdout] 89 ~ || key == KeyCode::Char('Й') [INFO] [stdout] 90 + { [INFO] [stdout] 91 + working = false; [INFO] [stdout] 92 + } [INFO] [stdout] 93 + [INFO] [stdout] 94 + if key == KeyCode::Char('b') [INFO] [stdout] 95 + || key == KeyCode::Char('B') [INFO] [stdout] 96 ~ || key == KeyCode::Char('И') [INFO] [stdout] 97 ~ || key == KeyCode::Char('и') [INFO] [stdout] 98 + { [INFO] [stdout] 99 + start_backup(&backup_config.borrow().backup_config) [INFO] [stdout] 100 + } [INFO] [stdout] 101 + [INFO] [stdout] 102 + if key == KeyCode::Down { [INFO] [stdout] 103 + backup_config.borrow_mut().next() [INFO] [stdout] 104 + } [INFO] [stdout] 105 + [INFO] [stdout] 106 + if key == KeyCode::Up { [INFO] [stdout] 107 + backup_config.borrow_mut().previous() [INFO] [stdout] 108 + } [INFO] [stdout] 109 + [INFO] [stdout] 110 + if key == KeyCode::Char('r') [INFO] [stdout] 111 + || key == KeyCode::Char('R') [INFO] [stdout] 112 ~ || key == KeyCode::Char('К') [INFO] [stdout] 113 ~ || key == KeyCode::Char('к') [INFO] [stdout] 114 + { [INFO] [stdout] 115 + backup_config.borrow_mut().remove_current(); [INFO] [stdout] 116 + } [INFO] [stdout] 117 + [INFO] [stdout] 118 + if key == KeyCode::Char('C') [INFO] [stdout] 119 + || key == KeyCode::Char('c') [INFO] [stdout] 120 ~ || key == KeyCode::Char('с') [INFO] [stdout] 121 ~ || key == KeyCode::Char('С') [INFO] [stdout] 122 + { [INFO] [stdout] 123 + backup_config.borrow_mut().clear_all(); [INFO] [stdout] 124 + } [INFO] [stdout] 125 + [INFO] [stdout] 126 ~ if key == KeyCode::Char('ф') [INFO] [stdout] 127 ~ || key == KeyCode::Char('Ф') [INFO] [stdout] 128 + || key == KeyCode::Char('A') [INFO] [stdout] 129 + || key == KeyCode::Char('a') [INFO] [stdout] 130 + { [INFO] [stdout] 131 + let callback = |path: String, element_type: EElementType| { [INFO] [stdout] 132 + backup_config.borrow_mut().add_new(SConfigElement { [INFO] [stdout] 133 + path: path, [INFO] [stdout] 134 + content_type: element_type, [INFO] [stdout] 135 + }) [INFO] [stdout] 136 + }; [INFO] [stdout] 137 + let _ = file_picker::start(terminal, callback, EElementType::Anything); [INFO] [stdout] 138 + } [INFO] [stdout] 139 + [INFO] [stdout] 140 + if key == KeyCode::Char('L') [INFO] [stdout] 141 + || key == KeyCode::Char('l') [INFO] [stdout] 142 ~ || key == KeyCode::Char('д') [INFO] [stdout] 143 ~ || key == KeyCode::Char('Д') [INFO] [stdout] 144 + { [INFO] [stdout] 145 + let callback = |path: String, _element_type: EElementType| { [INFO] [stdout] 146 + backup_config.borrow_mut().backup_config.path = path.clone(); [INFO] [stdout] 147 + backup_config.borrow_mut().backup_config.load_config(path); [INFO] [stdout] 148 + }; [INFO] [stdout] 149 + let _ = file_picker::start(terminal, callback, EElementType::File); [INFO] [stdout] 150 + } [INFO] [stdout] 151 + [INFO] [stdout] 152 ~ if key == KeyCode::Char('ы') [INFO] [stdout] 153 ~ || key == KeyCode::Char('Ы') [INFO] [stdout] 154 + || key == KeyCode::Char('s') [INFO] [stdout] 155 + || key == KeyCode::Char('S') [INFO] [stdout] 156 + { [INFO] [stdout] 157 + if backup_config.borrow().backup_config.path.is_empty() { [INFO] [stdout] 158 + let callback = |path: String, _element_type: EElementType| { [INFO] [stdout] 159 + backup_config.borrow_mut().backup_config.auto_save(path); [INFO] [stdout] 160 + }; [INFO] [stdout] 161 + let _ = file_picker::start(terminal, callback, EElementType::Folder); [INFO] [stdout] 162 + } else { [INFO] [stdout] 163 + backup_config [INFO] [stdout] 164 + .borrow_mut() [INFO] [stdout] 165 + .backup_config [INFO] [stdout] 166 + .auto_save(String::new()); [INFO] [stdout] 167 + } [INFO] [stdout] 168 + } [INFO] [stdout] 169 + }; [INFO] [stdout] 170 + handle_evnets(&mut callback); [INFO] [stdout] 171 + }; [INFO] [stdout] 172 + Ok(()) [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/backup_config.rs:281:13 [INFO] [stdout] | [INFO] [stdout] 281 | &config_element, [INFO] [stdout] | ^^^^^^^^^^^^^^^ help: change this to: `config_element` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unneeded late initialization [INFO] [stdout] --> src/ui/backup_config.rs:303:5 [INFO] [stdout] | [INFO] [stdout] 303 | let type_text: String; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_late_init [INFO] [stdout] = note: `#[warn(clippy::needless_late_init)]` on by default [INFO] [stdout] help: move the declaration `type_text` here and remove the assignments from the `match` arms [INFO] [stdout] | [INFO] [stdout] 303 ~ [INFO] [stdout] 304 ~ let type_text: String = match unit.content_type { [INFO] [stdout] 305 ~ EElementType::File => "File".to_string(), [INFO] [stdout] 306 ~ EElementType::Folder => "Folder".to_string(), [INFO] [stdout] 307 ~ EElementType::Anything => "ERROR".to_string(), [INFO] [stdout] 308 ~ }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/file_picker.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | / Ok(while working { [INFO] [stdout] 22 | | terminal.borrow_mut().draw(|f| { [INFO] [stdout] 23 | | f.render_widget(&file_explorer.widget(), f.size()); [INFO] [stdout] 24 | | })?; [INFO] [stdout] ... | [INFO] [stdout] 50 | | file_explorer.handle(&event)?; [INFO] [stdout] 51 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 21 ~ let _: () = while working { [INFO] [stdout] 22 + terminal.borrow_mut().draw(|f| { [INFO] [stdout] 23 + f.render_widget(&file_explorer.widget(), f.size()); [INFO] [stdout] 24 + })?; [INFO] [stdout] 25 + [INFO] [stdout] 26 + let event = read()?; [INFO] [stdout] 27 + if let Event::Key(key) = event { [INFO] [stdout] 28 + if key.code == KeyCode::Char('q') { [INFO] [stdout] 29 + break; [INFO] [stdout] 30 + } [INFO] [stdout] 31 + if key.code == KeyCode::Enter { [INFO] [stdout] 32 + let current_path = file_explorer.current().path(); [INFO] [stdout] 33 + [INFO] [stdout] 34 + let mut element_type = EElementType::Anything; [INFO] [stdout] 35 + if current_path.is_file() { [INFO] [stdout] 36 + element_type = EElementType::File [INFO] [stdout] 37 + } else if current_path.is_dir() { [INFO] [stdout] 38 + element_type = EElementType::Folder [INFO] [stdout] 39 + } [INFO] [stdout] 40 + [INFO] [stdout] 41 + if requested_type != EElementType::Anything && requested_type != element_type { [INFO] [stdout] 42 + continue; [INFO] [stdout] 43 + } [INFO] [stdout] 44 + [INFO] [stdout] 45 + fn_select(current_path.to_string_lossy().to_string(), element_type); [INFO] [stdout] 46 + working = false; [INFO] [stdout] 47 + } [INFO] [stdout] 48 + } [INFO] [stdout] 49 + [INFO] [stdout] 50 + file_explorer.handle(&event)?; [INFO] [stdout] 51 + }; [INFO] [stdout] 52 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/menu.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / Ok(while working { [INFO] [stdout] 41 | | terminal.borrow_mut().draw(|f| ui(f, &menu))?; [INFO] [stdout] 42 | | let (_close, _result) = handle_evnets(&mut menu, &mut select_fn).unwrap(); [INFO] [stdout] 43 | | working = !_close; [INFO] [stdout] 44 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 40 ~ let _: () = while working { [INFO] [stdout] 41 + terminal.borrow_mut().draw(|f| ui(f, &menu))?; [INFO] [stdout] 42 + let (_close, _result) = handle_evnets(&mut menu, &mut select_fn).unwrap(); [INFO] [stdout] 43 + working = !_close; [INFO] [stdout] 44 + }; [INFO] [stdout] 45 + Ok(()) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: passing a unit value to a function [INFO] [stdout] --> src/ui/recovery.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | / Ok(while working { [INFO] [stdout] 49 | | terminal.borrow_mut().draw(|f| ui(f, &recovery))?; [INFO] [stdout] 50 | | let (_close, _result) = [INFO] [stdout] 51 | | handle_events(&mut start_recovery, &mut recovery, terminal).unwrap(); [INFO] [stdout] 52 | | working = !_close; [INFO] [stdout] 53 | | }) [INFO] [stdout] | |______^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unit_arg [INFO] [stdout] help: move the expression in front of the call and replace it with the unit literal `()` [INFO] [stdout] | [INFO] [stdout] 48 ~ let _: () = while working { [INFO] [stdout] 49 + terminal.borrow_mut().draw(|f| ui(f, &recovery))?; [INFO] [stdout] 50 + let (_close, _result) = [INFO] [stdout] 51 + handle_events(&mut start_recovery, &mut recovery, terminal).unwrap(); [INFO] [stdout] 52 + working = !_close; [INFO] [stdout] 53 + }; [INFO] [stdout] 54 + Ok(()) [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/recovery.rs:153:32 [INFO] [stdout] | [INFO] [stdout] 153 | start_recovery(&recovery) [INFO] [stdout] | ^^^^^^^^^ help: change this to: `recovery` [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] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 20.46s [INFO] running `Command { std: "docker" "inspect" "ef471991da518f4391ba1921ba090a0782e5c9c99fc82efb2ff96892708e79ca", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "ef471991da518f4391ba1921ba090a0782e5c9c99fc82efb2ff96892708e79ca", kill_on_drop: false }` [INFO] [stdout] ef471991da518f4391ba1921ba090a0782e5c9c99fc82efb2ff96892708e79ca