[INFO] cloning repository https://github.com/plecong/mergerfs-rs [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/plecong/mergerfs-rs" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplecong%2Fmergerfs-rs", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplecong%2Fmergerfs-rs'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 948cb0f476bbcb77653ee85921619d36c5a3fe89 [INFO] linting plecong/mergerfs-rs against nightly for clippy-nonminimal_bool-denied [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fplecong%2Fmergerfs-rs" "/workspace/builds/worker-0-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-0-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/plecong/mergerfs-rs [INFO] finished tweaking git repo https://github.com/plecong/mergerfs-rs [INFO] tweaked toml for git repo https://github.com/plecong/mergerfs-rs written to /workspace/builds/worker-0-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/plecong/mergerfs-rs 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/plecong/mergerfs-rs 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 sdd v3.0.8 [INFO] [stderr] Downloaded tracing-attributes v0.1.29 [INFO] [stderr] Downloaded xattr v1.5.0 [INFO] [stderr] Downloaded fuser v0.14.0 [INFO] [stderr] Downloaded scc v2.3.4 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 8c62c1565befb8250b51efe6a31376790433c535cf379881a270da87168e2025 [INFO] running `Command { std: "docker" "start" "-a" "8c62c1565befb8250b51efe6a31376790433c535cf379881a270da87168e2025", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8c62c1565befb8250b51efe6a31376790433c535cf379881a270da87168e2025", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8c62c1565befb8250b51efe6a31376790433c535cf379881a270da87168e2025", kill_on_drop: false }` [INFO] [stdout] 8c62c1565befb8250b51efe6a31376790433c535cf379881a270da87168e2025 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-0-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] 1bda91d33b3efd251dc9ce85f3aa4c03580007fabf6406803c7e7586e168256e [INFO] running `Command { std: "docker" "start" "-a" "1bda91d33b3efd251dc9ce85f3aa4c03580007fabf6406803c7e7586e168256e", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.172 [INFO] [stderr] Compiling zerocopy v0.8.25 [INFO] [stderr] Compiling rustix v1.0.7 [INFO] [stderr] Checking log v0.4.27 [INFO] [stderr] Checking futures-sink v0.3.31 [INFO] [stderr] Checking bitflags v2.9.1 [INFO] [stderr] Checking futures-core v0.3.31 [INFO] [stderr] Compiling lock_api v0.4.13 [INFO] [stderr] Checking linux-raw-sys v0.9.4 [INFO] [stderr] Compiling fuser v0.14.0 [INFO] [stderr] Compiling syn v2.0.103 [INFO] [stderr] Compiling time-macros v0.2.22 [INFO] [stderr] Checking thread_local v1.1.9 [INFO] [stderr] Checking sdd v3.0.8 [INFO] [stderr] Checking futures-channel v0.3.31 [INFO] [stderr] Checking scc v2.3.4 [INFO] [stderr] Checking tracing-log v0.2.0 [INFO] [stderr] Checking futures-util v0.3.31 [INFO] [stderr] Checking time v0.3.41 [INFO] [stderr] Checking xattr v1.5.0 [INFO] [stderr] Checking ppv-lite86 v0.2.21 [INFO] [stderr] Checking getrandom v0.2.16 [INFO] [stderr] Checking parking_lot_core v0.9.11 [INFO] [stderr] Checking page_size v0.6.0 [INFO] [stderr] Checking getrandom v0.3.3 [INFO] [stderr] Checking nix v0.27.1 [INFO] [stderr] Checking filetime v0.2.25 [INFO] [stderr] Checking rand_core v0.6.4 [INFO] [stderr] Checking tempfile v3.20.0 [INFO] [stderr] Checking parking_lot v0.12.4 [INFO] [stderr] Checking rand_chacha v0.3.1 [INFO] [stderr] Checking rand v0.8.5 [INFO] [stderr] Checking futures-executor v0.3.31 [INFO] [stderr] Checking futures v0.3.31 [INFO] [stderr] Compiling zerocopy-derive v0.7.35 [INFO] [stderr] Compiling tracing-attributes v0.1.29 [INFO] [stderr] Compiling thiserror-impl v1.0.69 [INFO] [stderr] Compiling serial_test_derive v3.2.0 [INFO] [stderr] Checking serial_test v3.2.0 [INFO] [stderr] Checking zerocopy v0.7.35 [INFO] [stderr] Checking thiserror v1.0.69 [INFO] [stderr] Checking tracing v0.1.41 [INFO] [stderr] Checking tracing-subscriber v0.3.19 [INFO] [stderr] Checking mergerfs-rs v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `existing_path_all::ExistingPathAllActionPolicy` [INFO] [stdout] --> src/policy/action/mod.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub use existing_path_all::ExistingPathAllActionPolicy; [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/metadata_ops.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing; [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/rename_ops.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing; [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] [INFO] [stdout] [INFO] [stdout] warning: this import is redundant [INFO] [stdout] --> src/metadata_ops.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing; [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: unused import: `super::*` [INFO] [stdout] --> src/file_ops.rs:916:9 [INFO] [stdout] | [INFO] [stdout] 916 | use super::*; [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/rename_ops.rs:6:1 [INFO] [stdout] | [INFO] [stdout] 6 | use tracing; [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] [INFO] [stdout] [INFO] [stdout] warning: empty line after doc comment [INFO] [stdout] --> src/test_utils.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / /// Provides helpers for creating controlled test environments [INFO] [stdout] 3 | | [INFO] [stdout] | |_^ [INFO] [stdout] 4 | use std::path::{Path, PathBuf}; [INFO] [stdout] | - the comment documents this `use` import [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#empty_line_after_doc_comments [INFO] [stdout] = note: `#[warn(clippy::empty_line_after_doc_comments)]` on by default [INFO] [stdout] = help: if the empty line is unintentional, remove it [INFO] [stdout] help: if the comment should document the parent module use an inner doc comment [INFO] [stdout] | [INFO] [stdout] 1 ~ //! Test utilities for mergerfs-rs [INFO] [stdout] 2 ~ //! Provides helpers for creating controlled test environments [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/inode_integration_test.rs:3:9 [INFO] [stdout] | [INFO] [stdout] 3 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::test_utils::*` [INFO] [stdout] --> src/inode_integration_test.rs:4:9 [INFO] [stdout] | [INFO] [stdout] 4 | use crate::test_utils::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `ConfigRef` and `Config` [INFO] [stdout] --> src/inode_integration_test.rs:8:25 [INFO] [stdout] | [INFO] [stdout] 8 | use crate::config::{Config, ConfigRef}; [INFO] [stdout] | ^^^^^^ ^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `crate::config_manager::ConfigManager` [INFO] [stdout] --> src/inode_integration_test.rs:9:9 [INFO] [stdout] | [INFO] [stdout] 9 | use crate::config_manager::ConfigManager; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `parking_lot::RwLock` [INFO] [stdout] --> src/inode_integration_test.rs:14:9 [INFO] [stdout] | [INFO] [stdout] 14 | use parking_lot::RwLock; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/fuse_fs.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | let path = { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_no_create` and `is_readonly_or_no_create` are never used [INFO] [stdout] --> src/branch.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl Branch { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 29 | pub fn is_no_create(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn is_readonly_or_no_create(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `RelSymlink` and `AbsSymlink` are never constructed [INFO] [stdout] --> src/config.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 34 | pub enum RenameEXDEV { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 35 | Passthrough, // Return EXDEV error to caller [INFO] [stdout] 36 | RelSymlink, // Create relative symlinks [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 37 | AbsSymlink, // Create absolute symlinks [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RenameEXDEV` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `mountpoint`, `rename_exdev`, `direct_io_allow_mmap`, and `parallel_direct_writes` are never read [INFO] [stdout] --> src/config.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub mountpoint: PathBuf, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 82 | pub ignore_path_preserving_on_rename: bool, [INFO] [stdout] 83 | pub rename_exdev: RenameEXDEV, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub direct_io_allow_mmap: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 87 | pub parallel_direct_writes: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `should_enable_kernel_cache` is never used [INFO] [stdout] --> src/config.rs:115:12 [INFO] [stdout] | [INFO] [stdout] 108 | impl Config { [INFO] [stdout] | ----------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 115 | pub fn should_enable_kernel_cache(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NotSupported` is never constructed [INFO] [stdout] --> src/config_manager.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub enum ConfigError { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | NotSupported, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConfigError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `name` and `help` are never used [INFO] [stdout] --> src/config_manager.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub trait ConfigOption: Send + Sync + Any { [INFO] [stdout] | ------------ methods in this trait [INFO] [stdout] 35 | /// Get the option name (e.g., "moveonenospc") [INFO] [stdout] 36 | fn name(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | fn help(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `help` are never read [INFO] [stdout] --> src/config_manager.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 332 | struct BooleanOption { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 333 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 334 | value: Arc>, [INFO] [stdout] 335 | help: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `help` are never read [INFO] [stdout] --> src/config_manager.rs:474:5 [INFO] [stdout] | [INFO] [stdout] 473 | struct ReadOnlyOption { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 474 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 475 | value: String, [INFO] [stdout] 476 | help: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `execute` is never used [INFO] [stdout] --> src/policy/action/all.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl AllActionPolicy { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn execute( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ExistingPathFirstFoundActionPolicy` is never constructed [INFO] [stdout] --> src/policy/action/existing_path_first_found.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct ExistingPathFirstFoundActionPolicy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/policy/action/existing_path_first_found.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl ExistingPathFirstFoundActionPolicy { [INFO] [stdout] | --------------------------------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AllSearchPolicy` is never constructed [INFO] [stdout] --> src/policy/search/all.rs:7:12 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct AllSearchPolicy; [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/policy/search/all.rs:10:12 [INFO] [stdout] | [INFO] [stdout] 9 | impl AllSearchPolicy { [INFO] [stdout] | -------------------- associated function in this implementation [INFO] [stdout] 10 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `search` is never used [INFO] [stdout] --> src/policy/search/first_found.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 37 | impl FirstFoundSearchPolicy { [INFO] [stdout] | --------------------------- method in this implementation [INFO] [stdout] 38 | pub fn search( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `NewestSearchPolicy` is never constructed [INFO] [stdout] --> src/policy/search/newest.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct NewestSearchPolicy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/policy/search/newest.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl NewestSearchPolicy { [INFO] [stdout] | ----------------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_errno` is never used [INFO] [stdout] --> src/policy/error.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl PolicyError { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn from_errno(errno: i32) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/policy/traits.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub trait ActionPolicy: Send + Sync { [INFO] [stdout] | ------------ method in this trait [INFO] [stdout] 24 | fn name(&self) -> &'static str; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/policy/traits.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub trait SearchPolicy: Send + Sync { [INFO] [stdout] | ------------ method in this trait [INFO] [stdout] 35 | fn name(&self) -> &'static str; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `total` is never read [INFO] [stdout] --> src/policy/utils.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct DiskSpace { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 7 | pub total: u64, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DiskSpace` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `calculate_directory_size` is never used [INFO] [stdout] --> src/policy/utils.rs:70:8 [INFO] [stdout] | [INFO] [stdout] 12 | impl DiskSpace { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | fn calculate_directory_size(path: &Path) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_metadata` and `get_metadata_single` are never used [INFO] [stdout] --> src/metadata_ops.rs:103:12 [INFO] [stdout] | [INFO] [stdout] 13 | impl MetadataManager { [INFO] [stdout] | -------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 103 | pub fn get_metadata(&self, path: &Path) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 207 | fn get_metadata_single(&self, path: &Path) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `FileMetadata` is never constructed [INFO] [stdout] --> src/metadata_ops.rs:240:12 [INFO] [stdout] | [INFO] [stdout] 240 | pub struct FileMetadata { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: multiple methods are never used [INFO] [stdout] --> src/file_ops.rs:99:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl FileManager { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 99 | pub fn write_to_file(&self, path: &Path, offset: u64, data: &[u8]) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 156 | pub fn read_file(&self, path: &Path) -> Result, PolicyError> { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 171 | pub fn file_exists(&self, path: &Path) -> bool { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 225 | pub fn create_symlink(&self, link_path: &Path, target: &Path) -> Result<(), PolicyError> { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 358 | pub fn directory_exists(&self, path: &Path) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 366 | pub fn get_metadata(&self, path: &Path) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 389 | pub fn file_exists_search(&self, path: &Path) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `ino`, `flags`, and `direct_io` are never read [INFO] [stdout] --> src/file_handle.rs:8:9 [INFO] [stdout] | [INFO] [stdout] 7 | pub struct FileHandle { [INFO] [stdout] | ---------- fields in this struct [INFO] [stdout] 8 | pub ino: u64, [INFO] [stdout] | ^^^ [INFO] [stdout] 9 | pub path: PathBuf, [INFO] [stdout] 10 | pub flags: i32, [INFO] [stdout] | ^^^^^ [INFO] [stdout] 11 | pub branch_idx: Option, // Which branch the file was opened from [INFO] [stdout] 12 | pub direct_io: bool, [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `FileHandle` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_handle_count` and `update_branch` are never used [INFO] [stdout] --> src/file_handle.rs:51:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FileHandleManager { [INFO] [stdout] | ---------------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 51 | pub fn get_handle_count(&self) -> usize { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn update_branch(&self, fh: u64, new_branch_idx: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENODATA` is never used [INFO] [stdout] --> src/xattr/mod.rs:33:15 [INFO] [stdout] | [INFO] [stdout] 33 | const ENODATA: i32 = 61; // No data available (alias for ENOATTR) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `XattrOperations` is never used [INFO] [stdout] --> src/xattr/operations.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub trait XattrOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `MergerfsXattrHandler` is never constructed [INFO] [stdout] --> src/xattr/special_attrs.rs:6:12 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct MergerfsXattrHandler { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated items `new`, `handle_special_attr`, `get_basepath`, `get_relpath`, `get_fullpath`, and `get_allpaths` are never used [INFO] [stdout] --> src/xattr/special_attrs.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl MergerfsXattrHandler { [INFO] [stdout] | ------------------------- associated items in this implementation [INFO] [stdout] 11 | pub fn new(file_manager: Arc) -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn handle_special_attr(&self, path: &Path, name: &str) -> Option, XattrError>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 25 | fn get_basepath(&self, path: &Path) -> Result, XattrError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 36 | fn get_relpath(&self, path: &Path) -> Result, XattrError> { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 41 | fn get_fullpath(&self, path: &Path) -> Result, XattrError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 52 | fn get_allpaths(&self, path: &Path) -> Result, XattrError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EROFS` is never used [INFO] [stdout] --> src/fuse_fs.rs:25:7 [INFO] [stdout] | [INFO] [stdout] 25 | const EROFS: i32 = 30; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `next_inode` is never read [INFO] [stdout] --> src/fuse_fs.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 44 | pub struct MergerFS { [INFO] [stdout] | -------- field in this struct [INFO] [stdout] ... [INFO] [stdout] 55 | next_inode: std::sync::atomic::AtomicU64, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `allocate_inode` is never used [INFO] [stdout] --> src/fuse_fs.rs:163:12 [INFO] [stdout] | [INFO] [stdout] 72 | impl MergerFS { [INFO] [stdout] | ------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 163 | pub fn allocate_inode(&self) -> u64 { [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENODATA` is never used [INFO] [stdout] --> src/fuse_fs.rs:1947:7 [INFO] [stdout] | [INFO] [stdout] 1947 | const ENODATA: i32 = 61; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENOTSUP` is never used [INFO] [stdout] --> src/fuse_fs.rs:1948:7 [INFO] [stdout] | [INFO] [stdout] 1948 | const ENOTSUP: i32 = 95; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `to_errno` and `priority` are never used [INFO] [stdout] --> src/rename_ops.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 44 | impl RenameError { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 45 | pub fn to_errno(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn priority(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `F_OK` is never used [INFO] [stdout] --> src/permissions.rs:6:11 [INFO] [stdout] | [INFO] [stdout] 6 | pub const F_OK: i32 = 0; // Test for existence [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `X_OK` is never used [INFO] [stdout] --> src/permissions.rs:7:11 [INFO] [stdout] | [INFO] [stdout] 7 | pub const X_OK: i32 = 1; // Test for execute permission [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `W_OK` is never used [INFO] [stdout] --> src/permissions.rs:8:11 [INFO] [stdout] | [INFO] [stdout] 8 | pub const W_OK: i32 = 2; // Test for write permission [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `R_OK` is never used [INFO] [stdout] --> src/permissions.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub const R_OK: i32 = 4; // Test for read permission [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EACCES` is never used [INFO] [stdout] --> src/permissions.rs:12:7 [INFO] [stdout] | [INFO] [stdout] 12 | const EACCES: i32 = 13; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `AccessError` is never constructed [INFO] [stdout] --> src/permissions.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct AccessError(pub i32); [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `to_errno` is never used [INFO] [stdout] --> src/permissions.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl AccessError { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 18 | pub fn to_errno(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function `check_access` is never used [INFO] [stdout] --> src/permissions.rs:38:8 [INFO] [stdout] | [INFO] [stdout] 38 | pub fn check_access(uid: u32, gid: u32, metadata: &Metadata, mask: i32) -> Result<(), AccessError> { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `new_path` is never read [INFO] [stdout] --> src/moveonenospc.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct MoveResult { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 33 | pub new_branch_idx: usize, [INFO] [stdout] 34 | pub new_path: PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_enabled` is never used [INFO] [stdout] --> src/moveonenospc.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl MoveOnENOSPCHandler { [INFO] [stdout] | ------------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn is_enabled(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `O_RDONLY` is never used [INFO] [stdout] --> src/moveonenospc.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 172 | const O_RDONLY: i32 = 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/branch.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | std::io::Error::new(std::io::ErrorKind::Other, e) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 45 - std::io::Error::new(std::io::ErrorKind::Other, e) [INFO] [stdout] 45 + std::io::Error::other(e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / impl Default for StatFSMode { [INFO] [stdout] 15 | | fn default() -> Self { [INFO] [stdout] 16 | | StatFSMode::Base [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub enum StatFSMode { [INFO] [stdout] 11 ~ #[default] [INFO] [stdout] 12 ~ Base, // Use base branch paths [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / impl Default for StatFSIgnore { [INFO] [stdout] 28 | | fn default() -> Self { [INFO] [stdout] 29 | | StatFSIgnore::None [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 21 + #[derive(Default)] [INFO] [stdout] 22 | pub enum StatFSIgnore { [INFO] [stdout] 23 ~ #[default] [INFO] [stdout] 24 ~ None, // Don't ignore any branches [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl Default for RenameEXDEV { [INFO] [stdout] 41 | | fn default() -> Self { [INFO] [stdout] 42 | | RenameEXDEV::Passthrough [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 34 + #[derive(Default)] [INFO] [stdout] 35 | pub enum RenameEXDEV { [INFO] [stdout] 36 ~ #[default] [INFO] [stdout] 37 ~ Passthrough, // Return EXDEV error to caller [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:56:1 [INFO] [stdout] | [INFO] [stdout] 56 | / impl Default for CacheFiles { [INFO] [stdout] 57 | | fn default() -> Self { [INFO] [stdout] 58 | | CacheFiles::Libfuse [INFO] [stdout] 59 | | } [INFO] [stdout] 60 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 47 + #[derive(Default)] [INFO] [stdout] 48 | pub enum CacheFiles { [INFO] [stdout] 49 ~ #[default] [INFO] [stdout] 50 ~ Libfuse, // Use libfuse default (always cache) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/control_file.rs:85:31 [INFO] [stdout] | [INFO] [stdout] 85 | let option_name = &name_str["user.mergerfs.".len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/control_file.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | if name_str.starts_with("user.mergerfs.") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 84 ~ if let Some(option_name) = name_str.strip_prefix("user.mergerfs.") { [INFO] [stdout] 85 ~ match self.config_manager.get_option(option_name) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/control_file.rs:118:31 [INFO] [stdout] | [INFO] [stdout] 118 | let option_name = &name_str["user.mergerfs.".len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/control_file.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | if name_str.starts_with("user.mergerfs.") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 117 ~ if let Some(option_name) = name_str.strip_prefix("user.mergerfs.") { [INFO] [stdout] 118 ~ let value_str = match std::str::from_utf8(value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/policy/create/existing_path_first_found.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | fn select_branch<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 27 | &self, [INFO] [stdout] 28 | branches: &'a [Arc], [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 ~ fn select_branch( [INFO] [stdout] 27 | &self, [INFO] [stdout] 28 ~ branches: &[Arc], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/policy/create/existing_path_least_free_space.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | return branches [INFO] [stdout] | ____________________^ [INFO] [stdout] 37 | | .iter() [INFO] [stdout] 38 | | .find(|b| b.allows_create()) [INFO] [stdout] 39 | | .cloned() [INFO] [stdout] 40 | | .ok_or_else(|| PolicyError::ReadOnlyFilesystem); [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 `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 40 - .ok_or_else(|| PolicyError::ReadOnlyFilesystem); [INFO] [stdout] 40 + .ok_or(PolicyError::ReadOnlyFilesystem); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/policy/create/existing_path_most_free_space.rs:42:32 [INFO] [stdout] | [INFO] [stdout] 42 | has_writable = has_writable || false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `has_writable` [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: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/policy/create/existing_path_most_free_space.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / best_branch.ok_or_else(|| { [INFO] [stdout] 89 | | // Return appropriate error based on what we found [INFO] [stdout] 90 | | if !has_writable { [INFO] [stdout] 91 | | PolicyError::ReadOnlyFilesystem [INFO] [stdout] ... | [INFO] [stdout] 95 | | }) [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] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 88 ~ best_branch.ok_or({ [INFO] [stdout] 89 + // Return appropriate error based on what we found [INFO] [stdout] 90 + if !has_writable { [INFO] [stdout] 91 + PolicyError::ReadOnlyFilesystem [INFO] [stdout] 92 + } else { [INFO] [stdout] 93 + last_error [INFO] [stdout] 94 + } [INFO] [stdout] 95 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/create/least_free_space.rs:58:38 [INFO] [stdout] | [INFO] [stdout] 58 | PolicyError::IoError(io::Error::new( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 59 | | io::ErrorKind::Other, [INFO] [stdout] 60 | | "Failed to get disk space for any writable branch" [INFO] [stdout] 61 | | )) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 58 ~ PolicyError::IoError(io::Error::other( [INFO] [stdout] 59 ~ "Failed to get disk space for any writable branch" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/policy/create/least_used_space.rs:56:29 [INFO] [stdout] | [INFO] [stdout] 56 | / ... if error_msg.contains("No space") { [INFO] [stdout] 57 | | ... 2 [INFO] [stdout] 58 | | ... } else { [INFO] [stdout] 59 | | ... 1 [INFO] [stdout] 60 | | ... } [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] 54 ~ io::ErrorKind::Other [INFO] [stdout] 55 | // Check if it's actually ENOSPC [INFO] [stdout] 56 ~ if error_msg.contains("No space") => { [INFO] [stdout] 57 | 2 [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/create/least_used_space.rs:95:42 [INFO] [stdout] | [INFO] [stdout] 95 | PolicyError::IoError(io::Error::new( [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 96 | | io::ErrorKind::Other, [INFO] [stdout] 97 | | "Failed to get disk space for any writable branch" [INFO] [stdout] 98 | | )) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 95 ~ PolicyError::IoError(io::Error::other( [INFO] [stdout] 96 ~ "Failed to get disk space for any writable branch" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/create/most_free_space.rs:66:38 [INFO] [stdout] | [INFO] [stdout] 66 | PolicyError::IoError(io::Error::new( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 67 | | io::ErrorKind::Other, [INFO] [stdout] 68 | | "Failed to get disk space for any writable branch" [INFO] [stdout] 69 | | )) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 66 ~ PolicyError::IoError(io::Error::other( [INFO] [stdout] 67 ~ "Failed to get disk space for any writable branch" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/utils.rs:30:30 [INFO] [stdout] | [INFO] [stdout] 30 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 30 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] 30 + .map_err(|e| io::Error::other(e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/metadata_ops.rs:189:22 [INFO] [stdout] | [INFO] [stdout] 189 | .map_err(|e| PolicyError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PolicyError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/file_ops.rs:401:25 [INFO] [stdout] | [INFO] [stdout] 401 | / for entry in dir_entries { [INFO] [stdout] 402 | | if let Ok(entry) = entry { [INFO] [stdout] 403 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 404 | | entries.insert(name.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 407 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/file_ops.rs:402:29 [INFO] [stdout] | [INFO] [stdout] 402 | / ... if let Ok(entry) = entry { [INFO] [stdout] 403 | | ... if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 404 | | ... entries.insert(name.to_string()); [INFO] [stdout] 405 | | ... } [INFO] [stdout] 406 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 401 ~ for entry in dir_entries.flatten() { [INFO] [stdout] 402 + if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 403 + entries.insert(name.to_string()); [INFO] [stdout] 404 + } [INFO] [stdout] 405 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/fuse_fs.rs:179:38 [INFO] [stdout] | [INFO] [stdout] 179 | inode_data.attr.blocks = (new_size + 511) / 512; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `new_size.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/fuse_fs.rs:295:21 [INFO] [stdout] | [INFO] [stdout] 295 | blocks: (size + 511) / 512, // Round up to nearest block [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/fuse_fs.rs:442:13 [INFO] [stdout] | [INFO] [stdout] 442 | / if !inodes.contains_key(&ino) { [INFO] [stdout] 443 | | // New inode, insert it [INFO] [stdout] 444 | | inodes.insert(ino, InodeData { [INFO] [stdout] 445 | | path: child_path.clone(), [INFO] [stdout] ... | [INFO] [stdout] 459 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 442 ~ if let std::collections::hash_map::Entry::Vacant(e) = inodes.entry(ino) { [INFO] [stdout] 443 + // New inode, insert it [INFO] [stdout] 444 + e.insert(InodeData { [INFO] [stdout] 445 + path: child_path.clone(), [INFO] [stdout] 446 + attr, [INFO] [stdout] 447 + content_lock: Arc::new(parking_lot::RwLock::new(())), [INFO] [stdout] 448 + branch_idx: Some(branch_idx), [INFO] [stdout] 449 + original_ino, [INFO] [stdout] 450 + }); [INFO] [stdout] 451 + } else { [INFO] [stdout] 452 + // Existing inode (hard link) - update attributes to get fresh nlink [INFO] [stdout] 453 + if let Some(inode_data) = inodes.get_mut(&ino) { [INFO] [stdout] 454 + inode_data.attr.nlink = attr.nlink; [INFO] [stdout] 455 + inode_data.attr.size = attr.size; [INFO] [stdout] 456 + inode_data.attr.mtime = attr.mtime; [INFO] [stdout] 457 + inode_data.attr.ctime = attr.ctime; [INFO] [stdout] 458 + } [INFO] [stdout] 459 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `path` [INFO] [stdout] --> src/fuse_fs.rs:342:13 [INFO] [stdout] | [INFO] [stdout] 342 | let path = { [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_path` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/fuse_fs.rs:971:62 [INFO] [stdout] | [INFO] [stdout] 971 | ... Err(PolicyError::IoError(std::io::Error::new( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 972 | | ... std::io::ErrorKind::Other, [INFO] [stdout] 973 | | ... format!("Seek failed: {}", e) [INFO] [stdout] 974 | | ... ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 971 ~ Err(PolicyError::IoError(std::io::Error::other( [INFO] [stdout] 972 ~ format!("Seek failed: {}", e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/fuse_fs.rs:1021:58 [INFO] [stdout] | [INFO] [stdout] 1021 | ... Err(PolicyError::IoError(std::io::Error::new( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1022 | | ... std::io::ErrorKind::Other, [INFO] [stdout] 1023 | | ... format!("Seek failed: {}", e) [INFO] [stdout] 1024 | | ... ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1021 ~ Err(PolicyError::IoError(std::io::Error::other( [INFO] [stdout] 1022 ~ format!("Seek failed: {}", e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/fuse_fs.rs:1098:70 [INFO] [stdout] | [INFO] [stdout] 1098 | ... Err(PolicyError::IoError(std::io::Error::new( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1099 | | ... std::io::ErrorKind::Other, [INFO] [stdout] 1100 | | ... format!("Seek failed: {}", e) [INFO] [stdout] 1101 | | ... ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1098 ~ Err(PolicyError::IoError(std::io::Error::other( [INFO] [stdout] 1099 ~ format!("Seek failed: {}", e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/fuse_fs.rs:1811:21 [INFO] [stdout] | [INFO] [stdout] 1811 | / if !inodes.contains_key(&link_ino) { [INFO] [stdout] 1812 | | // New inode (shouldn't happen with devino-hash for hard links) [INFO] [stdout] 1813 | | tracing::warn!("Hard link created new inode {} - expected to share with source", link_ino); [INFO] [stdout] 1814 | | inodes.insert(link_ino, InodeData { [INFO] [stdout] ... | [INFO] [stdout] 1833 | | drop(inodes); [INFO] [stdout] 1834 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1811 ~ if let std::collections::hash_map::Entry::Vacant(e) = inodes.entry(link_ino) { [INFO] [stdout] 1812 + // New inode (shouldn't happen with devino-hash for hard links) [INFO] [stdout] 1813 + tracing::warn!("Hard link created new inode {} - expected to share with source", link_ino); [INFO] [stdout] 1814 + e.insert(InodeData { [INFO] [stdout] 1815 + path: link_path_str.clone(), [INFO] [stdout] 1816 + attr, [INFO] [stdout] 1817 + content_lock: Arc::new(parking_lot::RwLock::new(())), [INFO] [stdout] 1818 + branch_idx: Some(branch_idx), [INFO] [stdout] 1819 + original_ino, [INFO] [stdout] 1820 + }); [INFO] [stdout] 1821 + drop(inodes); [INFO] [stdout] 1822 + } else { [INFO] [stdout] 1823 + // Existing inode - refresh attributes to get updated nlink [INFO] [stdout] 1824 + tracing::info!("Hard link shares inode {} with source", link_ino); [INFO] [stdout] 1825 + if let Some((fresh_attr, _, _)) = self.create_file_attr_with_branch(&link_path) { [INFO] [stdout] 1826 + // Update the cached attributes with fresh nlink count [INFO] [stdout] 1827 + if let Some(inode_data) = inodes.get_mut(&link_ino) { [INFO] [stdout] 1828 + inode_data.attr.nlink = fresh_attr.nlink; [INFO] [stdout] 1829 + inode_data.attr.mtime = fresh_attr.mtime; [INFO] [stdout] 1830 + inode_data.attr.ctime = fresh_attr.ctime; [INFO] [stdout] 1831 + } [INFO] [stdout] 1832 + } [INFO] [stdout] 1833 + drop(inodes); [INFO] [stdout] 1834 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/inode.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / impl Default for InodeCalc { [INFO] [stdout] 25 | | fn default() -> Self { [INFO] [stdout] 26 | | InodeCalc::HybridHash [INFO] [stdout] 27 | | } [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub enum InodeCalc { [INFO] [stdout] 9 | /// Use the original inode from the underlying filesystem [INFO] [stdout] ... [INFO] [stdout] 19 | /// Use path-hash for directories, devino-hash for files (default) [INFO] [stdout] 20 ~ #[default] [INFO] [stdout] 21 ~ HybridHash, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/inode.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn to_string(&self) -> &'static str { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/rename_ops.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | io::Error::new(io::ErrorKind::Other, "No rename succeeded") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 303 - io::Error::new(io::ErrorKind::Other, "No rename succeeded") [INFO] [stdout] 303 + io::Error::other("No rename succeeded") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/moveonenospc.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | / if let Some(value) = value { [INFO] [stdout] 246 | | let _ = set(dst, &attr, &value); [INFO] [stdout] 247 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/moveonenospc.rs:244:31 [INFO] [stdout] | [INFO] [stdout] 244 | if let Ok(value) = get(src, &attr) { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 245 | if let Some(value) = value { [INFO] [stdout] | ^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/moveonenospc.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | / match error.raw_os_error() { [INFO] [stdout] 299 | | Some(ENOSPC) => true, [INFO] [stdout] 300 | | Some(EDQUOT) => true, [INFO] [stdout] 301 | | _ => false, [INFO] [stdout] 302 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 298 - match error.raw_os_error() { [INFO] [stdout] 299 - Some(ENOSPC) => true, [INFO] [stdout] 300 - Some(EDQUOT) => true, [INFO] [stdout] 301 - _ => false, [INFO] [stdout] 302 - } [INFO] [stdout] 298 + matches!(error.raw_os_error(), Some(ENOSPC) | Some(EDQUOT)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `branches` [INFO] [stdout] --> src/fuse_integration_tests.rs:968:13 [INFO] [stdout] | [INFO] [stdout] 968 | let branches = vec![Arc::new(Branch::new(branch1.clone(), BranchMode::ReadWrite))]; [INFO] [stdout] | ^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_branches` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `full_path` [INFO] [stdout] --> src/inode_integration_test.rs:102:13 [INFO] [stdout] | [INFO] [stdout] 102 | let full_path = branch.full_path(file_path); [INFO] [stdout] | ^^^^^^^^^ help: if this is intentional, prefix it with an underscore: `_full_path` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `is_no_create` and `is_readonly_or_no_create` are never used [INFO] [stdout] --> src/branch.rs:29:12 [INFO] [stdout] | [INFO] [stdout] 16 | impl Branch { [INFO] [stdout] | ----------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 29 | pub fn is_no_create(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 33 | pub fn is_readonly_or_no_create(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variants `RelSymlink` and `AbsSymlink` are never constructed [INFO] [stdout] --> src/config.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 34 | pub enum RenameEXDEV { [INFO] [stdout] | ----------- variants in this enum [INFO] [stdout] 35 | Passthrough, // Return EXDEV error to caller [INFO] [stdout] 36 | RelSymlink, // Create relative symlinks [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 37 | AbsSymlink, // Create absolute symlinks [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `RenameEXDEV` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `mountpoint`, `rename_exdev`, `direct_io_allow_mmap`, and `parallel_direct_writes` are never read [INFO] [stdout] --> src/config.rs:81:9 [INFO] [stdout] | [INFO] [stdout] 78 | pub struct Config { [INFO] [stdout] | ------ fields in this struct [INFO] [stdout] ... [INFO] [stdout] 81 | pub mountpoint: PathBuf, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] 82 | pub ignore_path_preserving_on_rename: bool, [INFO] [stdout] 83 | pub rename_exdev: RenameEXDEV, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 86 | pub direct_io_allow_mmap: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] 87 | pub parallel_direct_writes: bool, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `Config` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variant `NotSupported` is never constructed [INFO] [stdout] --> src/config_manager.rs:19:5 [INFO] [stdout] | [INFO] [stdout] 11 | pub enum ConfigError { [INFO] [stdout] | ----------- variant in this enum [INFO] [stdout] ... [INFO] [stdout] 19 | NotSupported, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `ConfigError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `name` and `help` are never used [INFO] [stdout] --> src/config_manager.rs:36:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub trait ConfigOption: Send + Sync + Any { [INFO] [stdout] | ------------ methods in this trait [INFO] [stdout] 35 | /// Get the option name (e.g., "moveonenospc") [INFO] [stdout] 36 | fn name(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] ... [INFO] [stdout] 50 | fn help(&self) -> &str; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `help` are never read [INFO] [stdout] --> src/config_manager.rs:333:5 [INFO] [stdout] | [INFO] [stdout] 332 | struct BooleanOption { [INFO] [stdout] | ------------- fields in this struct [INFO] [stdout] 333 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 334 | value: Arc>, [INFO] [stdout] 335 | help: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: fields `name` and `help` are never read [INFO] [stdout] --> src/config_manager.rs:474:5 [INFO] [stdout] | [INFO] [stdout] 473 | struct ReadOnlyOption { [INFO] [stdout] | -------------- fields in this struct [INFO] [stdout] 474 | name: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] 475 | value: String, [INFO] [stdout] 476 | help: String, [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `execute` is never used [INFO] [stdout] --> src/policy/action/all.rs:16:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl AllActionPolicy { [INFO] [stdout] | -------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 16 | pub fn execute( [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: struct `ExistingPathFirstFoundActionPolicy` is never constructed [INFO] [stdout] --> src/policy/action/existing_path_first_found.rs:8:12 [INFO] [stdout] | [INFO] [stdout] 8 | pub struct ExistingPathFirstFoundActionPolicy; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `new` is never used [INFO] [stdout] --> src/policy/action/existing_path_first_found.rs:11:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl ExistingPathFirstFoundActionPolicy { [INFO] [stdout] | --------------------------------------- associated function in this implementation [INFO] [stdout] 11 | pub fn new() -> Self { [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `search` is never used [INFO] [stdout] --> src/policy/search/first_found.rs:38:12 [INFO] [stdout] | [INFO] [stdout] 37 | impl FirstFoundSearchPolicy { [INFO] [stdout] | --------------------------- method in this implementation [INFO] [stdout] 38 | pub fn search( [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `from_errno` is never used [INFO] [stdout] --> src/policy/error.rs:46:12 [INFO] [stdout] | [INFO] [stdout] 29 | impl PolicyError { [INFO] [stdout] | ---------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 46 | pub fn from_errno(errno: i32) -> Self { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/policy/traits.rs:24:8 [INFO] [stdout] | [INFO] [stdout] 23 | pub trait ActionPolicy: Send + Sync { [INFO] [stdout] | ------------ method in this trait [INFO] [stdout] 24 | fn name(&self) -> &'static str; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `name` is never used [INFO] [stdout] --> src/policy/traits.rs:35:8 [INFO] [stdout] | [INFO] [stdout] 34 | pub trait SearchPolicy: Send + Sync { [INFO] [stdout] | ------------ method in this trait [INFO] [stdout] 35 | fn name(&self) -> &'static str; [INFO] [stdout] | ^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `total` is never read [INFO] [stdout] --> src/policy/utils.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 6 | pub struct DiskSpace { [INFO] [stdout] | --------- field in this struct [INFO] [stdout] 7 | pub total: u64, [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `DiskSpace` has derived impls for the traits `Clone` and `Debug`, but these are intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: associated function `calculate_directory_size` is never used [INFO] [stdout] --> src/policy/utils.rs:70:8 [INFO] [stdout] | [INFO] [stdout] 12 | impl DiskSpace { [INFO] [stdout] | -------------- associated function in this implementation [INFO] [stdout] ... [INFO] [stdout] 70 | fn calculate_directory_size(path: &Path) -> Result { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `get_metadata` and `file_exists_search` are never used [INFO] [stdout] --> src/file_ops.rs:366:12 [INFO] [stdout] | [INFO] [stdout] 18 | impl FileManager { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] ... [INFO] [stdout] 366 | pub fn get_metadata(&self, path: &Path) -> Option { [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 389 | pub fn file_exists_search(&self, path: &Path) -> bool { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `update_branch` is never used [INFO] [stdout] --> src/file_handle.rs:55:12 [INFO] [stdout] | [INFO] [stdout] 20 | impl FileHandleManager { [INFO] [stdout] | ---------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 55 | pub fn update_branch(&self, fh: u64, new_branch_idx: usize) { [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENODATA` is never used [INFO] [stdout] --> src/xattr/mod.rs:33:15 [INFO] [stdout] | [INFO] [stdout] 33 | const ENODATA: i32 = 61; // No data available (alias for ENOATTR) [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait `XattrOperations` is never used [INFO] [stdout] --> src/xattr/operations.rs:9:11 [INFO] [stdout] | [INFO] [stdout] 9 | pub trait XattrOperations { [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `handle_special_attr` is never used [INFO] [stdout] --> src/xattr/special_attrs.rs:15:12 [INFO] [stdout] | [INFO] [stdout] 10 | impl MergerfsXattrHandler { [INFO] [stdout] | ------------------------- method in this implementation [INFO] [stdout] ... [INFO] [stdout] 15 | pub fn handle_special_attr(&self, path: &Path, name: &str) -> Option, XattrError>> { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `EROFS` is never used [INFO] [stdout] --> src/fuse_fs.rs:25:7 [INFO] [stdout] | [INFO] [stdout] 25 | const EROFS: i32 = 30; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENODATA` is never used [INFO] [stdout] --> src/fuse_fs.rs:1947:7 [INFO] [stdout] | [INFO] [stdout] 1947 | const ENODATA: i32 = 61; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `ENOTSUP` is never used [INFO] [stdout] --> src/fuse_fs.rs:1948:7 [INFO] [stdout] | [INFO] [stdout] 1948 | const ENOTSUP: i32 = 95; [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods `to_errno` and `priority` are never used [INFO] [stdout] --> src/rename_ops.rs:45:12 [INFO] [stdout] | [INFO] [stdout] 44 | impl RenameError { [INFO] [stdout] | ---------------- methods in this implementation [INFO] [stdout] 45 | pub fn to_errno(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 59 | fn priority(&self) -> u32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `0` is never read [INFO] [stdout] --> src/permissions.rs:15:24 [INFO] [stdout] | [INFO] [stdout] 15 | pub struct AccessError(pub i32); [INFO] [stdout] | ----------- ^^^^^^^ [INFO] [stdout] | | [INFO] [stdout] | field in this struct [INFO] [stdout] | [INFO] [stdout] = help: consider removing this field [INFO] [stdout] = note: `AccessError` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `to_errno` is never used [INFO] [stdout] --> src/permissions.rs:18:12 [INFO] [stdout] | [INFO] [stdout] 17 | impl AccessError { [INFO] [stdout] | ---------------- method in this implementation [INFO] [stdout] 18 | pub fn to_errno(&self) -> i32 { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field `new_path` is never read [INFO] [stdout] --> src/moveonenospc.rs:34:9 [INFO] [stdout] | [INFO] [stdout] 32 | pub struct MoveResult { [INFO] [stdout] | ---------- field in this struct [INFO] [stdout] 33 | pub new_branch_idx: usize, [INFO] [stdout] 34 | pub new_path: PathBuf, [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: method `is_enabled` is never used [INFO] [stdout] --> src/moveonenospc.rs:48:12 [INFO] [stdout] | [INFO] [stdout] 42 | impl MoveOnENOSPCHandler { [INFO] [stdout] | ------------------------ method in this implementation [INFO] [stdout] ... [INFO] [stdout] 48 | pub fn is_enabled(&self) -> bool { [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: constant `O_RDONLY` is never used [INFO] [stdout] --> src/moveonenospc.rs:172:19 [INFO] [stdout] | [INFO] [stdout] 172 | const O_RDONLY: i32 = 0; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/branch.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 45 | std::io::Error::new(std::io::ErrorKind::Other, e) [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] = note: `#[warn(clippy::io_other_error)]` on by default [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 45 - std::io::Error::new(std::io::ErrorKind::Other, e) [INFO] [stdout] 45 + std::io::Error::other(e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / impl Default for StatFSMode { [INFO] [stdout] 15 | | fn default() -> Self { [INFO] [stdout] 16 | | StatFSMode::Base [INFO] [stdout] 17 | | } [INFO] [stdout] 18 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] = note: `#[warn(clippy::derivable_impls)]` on by default [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 9 + #[derive(Default)] [INFO] [stdout] 10 | pub enum StatFSMode { [INFO] [stdout] 11 ~ #[default] [INFO] [stdout] 12 ~ Base, // Use base branch paths [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:27:1 [INFO] [stdout] | [INFO] [stdout] 27 | / impl Default for StatFSIgnore { [INFO] [stdout] 28 | | fn default() -> Self { [INFO] [stdout] 29 | | StatFSIgnore::None [INFO] [stdout] 30 | | } [INFO] [stdout] 31 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 21 + #[derive(Default)] [INFO] [stdout] 22 | pub enum StatFSIgnore { [INFO] [stdout] 23 ~ #[default] [INFO] [stdout] 24 ~ None, // Don't ignore any branches [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:40:1 [INFO] [stdout] | [INFO] [stdout] 40 | / impl Default for RenameEXDEV { [INFO] [stdout] 41 | | fn default() -> Self { [INFO] [stdout] 42 | | RenameEXDEV::Passthrough [INFO] [stdout] 43 | | } [INFO] [stdout] 44 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 34 + #[derive(Default)] [INFO] [stdout] 35 | pub enum RenameEXDEV { [INFO] [stdout] 36 ~ #[default] [INFO] [stdout] 37 ~ Passthrough, // Return EXDEV error to caller [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/config.rs:56:1 [INFO] [stdout] | [INFO] [stdout] 56 | / impl Default for CacheFiles { [INFO] [stdout] 57 | | fn default() -> Self { [INFO] [stdout] 58 | | CacheFiles::Libfuse [INFO] [stdout] 59 | | } [INFO] [stdout] 60 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 47 + #[derive(Default)] [INFO] [stdout] 48 | pub enum CacheFiles { [INFO] [stdout] 49 ~ #[default] [INFO] [stdout] 50 ~ Libfuse, // Use libfuse default (always cache) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: items after a test module [INFO] [stdout] --> src/config_manager.rs:512:1 [INFO] [stdout] | [INFO] [stdout] 512 | mod tests { [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 625 | struct StatFSModeOption { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 629 | impl StatFSModeOption { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 635 | impl ConfigOption for StatFSModeOption { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 666 | struct StatFSIgnoreOption { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 670 | impl StatFSIgnoreOption { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] ... [INFO] [stdout] 676 | impl ConfigOption for StatFSIgnoreOption { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#items_after_test_module [INFO] [stdout] = note: `#[warn(clippy::items_after_test_module)]` on by default [INFO] [stdout] = help: move the items to before the test module was defined [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/control_file.rs:85:31 [INFO] [stdout] | [INFO] [stdout] 85 | let option_name = &name_str["user.mergerfs.".len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/control_file.rs:84:9 [INFO] [stdout] | [INFO] [stdout] 84 | if name_str.starts_with("user.mergerfs.") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] = note: `#[warn(clippy::manual_strip)]` on by default [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 84 ~ if let Some(option_name) = name_str.strip_prefix("user.mergerfs.") { [INFO] [stdout] 85 ~ match self.config_manager.get_option(option_name) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: stripping a prefix manually [INFO] [stdout] --> src/control_file.rs:118:31 [INFO] [stdout] | [INFO] [stdout] 118 | let option_name = &name_str["user.mergerfs.".len()..]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] note: the prefix was tested here [INFO] [stdout] --> src/control_file.rs:117:9 [INFO] [stdout] | [INFO] [stdout] 117 | if name_str.starts_with("user.mergerfs.") { [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_strip [INFO] [stdout] help: try using the `strip_prefix` method [INFO] [stdout] | [INFO] [stdout] 117 ~ if let Some(option_name) = name_str.strip_prefix("user.mergerfs.") { [INFO] [stdout] 118 ~ let value_str = match std::str::from_utf8(value) { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the following explicit lifetimes could be elided: 'a [INFO] [stdout] --> src/policy/create/existing_path_first_found.rs:26:22 [INFO] [stdout] | [INFO] [stdout] 26 | fn select_branch<'a>( [INFO] [stdout] | ^^ [INFO] [stdout] 27 | &self, [INFO] [stdout] 28 | branches: &'a [Arc], [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_lifetimes [INFO] [stdout] = note: `#[warn(clippy::needless_lifetimes)]` on by default [INFO] [stdout] help: elide the lifetimes [INFO] [stdout] | [INFO] [stdout] 26 ~ fn select_branch( [INFO] [stdout] 27 | &self, [INFO] [stdout] 28 ~ branches: &[Arc], [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/policy/create/existing_path_least_free_space.rs:36:20 [INFO] [stdout] | [INFO] [stdout] 36 | return branches [INFO] [stdout] | ____________________^ [INFO] [stdout] 37 | | .iter() [INFO] [stdout] 38 | | .find(|b| b.allows_create()) [INFO] [stdout] 39 | | .cloned() [INFO] [stdout] 40 | | .ok_or_else(|| PolicyError::ReadOnlyFilesystem); [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 `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 40 - .ok_or_else(|| PolicyError::ReadOnlyFilesystem); [INFO] [stdout] 40 + .ok_or(PolicyError::ReadOnlyFilesystem); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this boolean expression can be simplified [INFO] [stdout] --> src/policy/create/existing_path_most_free_space.rs:42:32 [INFO] [stdout] | [INFO] [stdout] 42 | has_writable = has_writable || false; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ help: try: `has_writable` [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: unnecessary closure used to substitute value for `Option::None` [INFO] [stdout] --> src/policy/create/existing_path_most_free_space.rs:88:9 [INFO] [stdout] | [INFO] [stdout] 88 | / best_branch.ok_or_else(|| { [INFO] [stdout] 89 | | // Return appropriate error based on what we found [INFO] [stdout] 90 | | if !has_writable { [INFO] [stdout] 91 | | PolicyError::ReadOnlyFilesystem [INFO] [stdout] ... | [INFO] [stdout] 95 | | }) [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] help: use `ok_or` instead [INFO] [stdout] | [INFO] [stdout] 88 ~ best_branch.ok_or({ [INFO] [stdout] 89 + // Return appropriate error based on what we found [INFO] [stdout] 90 + if !has_writable { [INFO] [stdout] 91 + PolicyError::ReadOnlyFilesystem [INFO] [stdout] 92 + } else { [INFO] [stdout] 93 + last_error [INFO] [stdout] 94 + } [INFO] [stdout] 95 + }) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/create/least_free_space.rs:58:38 [INFO] [stdout] | [INFO] [stdout] 58 | PolicyError::IoError(io::Error::new( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 59 | | io::ErrorKind::Other, [INFO] [stdout] 60 | | "Failed to get disk space for any writable branch" [INFO] [stdout] 61 | | )) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 58 ~ PolicyError::IoError(io::Error::other( [INFO] [stdout] 59 ~ "Failed to get disk space for any writable branch" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if` can be collapsed into the outer `match` [INFO] [stdout] --> src/policy/create/least_used_space.rs:56:29 [INFO] [stdout] | [INFO] [stdout] 56 | / ... if error_msg.contains("No space") { [INFO] [stdout] 57 | | ... 2 [INFO] [stdout] 58 | | ... } else { [INFO] [stdout] 59 | | ... 1 [INFO] [stdout] 60 | | ... } [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] 54 ~ io::ErrorKind::Other [INFO] [stdout] 55 | // Check if it's actually ENOSPC [INFO] [stdout] 56 ~ if error_msg.contains("No space") => { [INFO] [stdout] 57 | 2 [INFO] [stdout] 58 ~ } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/create/least_used_space.rs:95:42 [INFO] [stdout] | [INFO] [stdout] 95 | PolicyError::IoError(io::Error::new( [INFO] [stdout] | __________________________________________^ [INFO] [stdout] 96 | | io::ErrorKind::Other, [INFO] [stdout] 97 | | "Failed to get disk space for any writable branch" [INFO] [stdout] 98 | | )) [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 95 ~ PolicyError::IoError(io::Error::other( [INFO] [stdout] 96 ~ "Failed to get disk space for any writable branch" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/create/most_free_space.rs:66:38 [INFO] [stdout] | [INFO] [stdout] 66 | PolicyError::IoError(io::Error::new( [INFO] [stdout] | ______________________________________^ [INFO] [stdout] 67 | | io::ErrorKind::Other, [INFO] [stdout] 68 | | "Failed to get disk space for any writable branch" [INFO] [stdout] 69 | | )) [INFO] [stdout] | |_________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 66 ~ PolicyError::IoError(io::Error::other( [INFO] [stdout] 67 ~ "Failed to get disk space for any writable branch" [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/policy/utils.rs:30:30 [INFO] [stdout] | [INFO] [stdout] 30 | .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 30 - .map_err(|e| io::Error::new(io::ErrorKind::Other, e))?; [INFO] [stdout] 30 + .map_err(|e| io::Error::other(e))?; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: redundant closure [INFO] [stdout] --> src/metadata_ops.rs:189:22 [INFO] [stdout] | [INFO] [stdout] 189 | .map_err(|e| PolicyError::IoError(e))?; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: replace the closure with the tuple variant itself: `PolicyError::IoError` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stdout] = note: `#[warn(clippy::redundant_closure)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary `if let` since only the `Ok` variant of the iterator element is used [INFO] [stdout] --> src/file_ops.rs:401:25 [INFO] [stdout] | [INFO] [stdout] 401 | / for entry in dir_entries { [INFO] [stdout] 402 | | if let Ok(entry) = entry { [INFO] [stdout] 403 | | if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 404 | | entries.insert(name.to_string()); [INFO] [stdout] ... | [INFO] [stdout] 407 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: try `.flatten()` and remove the `if let` statement in the for loop [INFO] [stdout] --> src/file_ops.rs:402:29 [INFO] [stdout] | [INFO] [stdout] 402 | / ... if let Ok(entry) = entry { [INFO] [stdout] 403 | | ... if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 404 | | ... entries.insert(name.to_string()); [INFO] [stdout] 405 | | ... } [INFO] [stdout] 406 | | ... } [INFO] [stdout] | |_______________________^ [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_flatten [INFO] [stdout] = note: `#[warn(clippy::manual_flatten)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 401 ~ for entry in dir_entries.flatten() { [INFO] [stdout] 402 + if let Some(name) = entry.file_name().to_str() { [INFO] [stdout] 403 + entries.insert(name.to_string()); [INFO] [stdout] 404 + } [INFO] [stdout] 405 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/fuse_fs.rs:179:38 [INFO] [stdout] | [INFO] [stdout] 179 | inode_data.attr.blocks = (new_size + 511) / 512; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `new_size.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] = note: `#[warn(clippy::manual_div_ceil)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/fuse_fs.rs:295:21 [INFO] [stdout] | [INFO] [stdout] 295 | blocks: (size + 511) / 512, // Round up to nearest block [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `size.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/fuse_fs.rs:442:13 [INFO] [stdout] | [INFO] [stdout] 442 | / if !inodes.contains_key(&ino) { [INFO] [stdout] 443 | | // New inode, insert it [INFO] [stdout] 444 | | inodes.insert(ino, InodeData { [INFO] [stdout] 445 | | path: child_path.clone(), [INFO] [stdout] ... | [INFO] [stdout] 459 | | } [INFO] [stdout] | |_____________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] = note: `#[warn(clippy::map_entry)]` on by default [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 442 ~ if let std::collections::hash_map::Entry::Vacant(e) = inodes.entry(ino) { [INFO] [stdout] 443 + // New inode, insert it [INFO] [stdout] 444 + e.insert(InodeData { [INFO] [stdout] 445 + path: child_path.clone(), [INFO] [stdout] 446 + attr, [INFO] [stdout] 447 + content_lock: Arc::new(parking_lot::RwLock::new(())), [INFO] [stdout] 448 + branch_idx: Some(branch_idx), [INFO] [stdout] 449 + original_ino, [INFO] [stdout] 450 + }); [INFO] [stdout] 451 + } else { [INFO] [stdout] 452 + // Existing inode (hard link) - update attributes to get fresh nlink [INFO] [stdout] 453 + if let Some(inode_data) = inodes.get_mut(&ino) { [INFO] [stdout] 454 + inode_data.attr.nlink = attr.nlink; [INFO] [stdout] 455 + inode_data.attr.size = attr.size; [INFO] [stdout] 456 + inode_data.attr.mtime = attr.mtime; [INFO] [stdout] 457 + inode_data.attr.ctime = attr.ctime; [INFO] [stdout] 458 + } [INFO] [stdout] 459 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/fuse_fs.rs:971:62 [INFO] [stdout] | [INFO] [stdout] 971 | ... Err(PolicyError::IoError(std::io::Error::new( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 972 | | ... std::io::ErrorKind::Other, [INFO] [stdout] 973 | | ... format!("Seek failed: {}", e) [INFO] [stdout] 974 | | ... ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 971 ~ Err(PolicyError::IoError(std::io::Error::other( [INFO] [stdout] 972 ~ format!("Seek failed: {}", e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/fuse_fs.rs:1021:58 [INFO] [stdout] | [INFO] [stdout] 1021 | ... Err(PolicyError::IoError(std::io::Error::new( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1022 | | ... std::io::ErrorKind::Other, [INFO] [stdout] 1023 | | ... format!("Seek failed: {}", e) [INFO] [stdout] 1024 | | ... ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1021 ~ Err(PolicyError::IoError(std::io::Error::other( [INFO] [stdout] 1022 ~ format!("Seek failed: {}", e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/fuse_fs.rs:1098:70 [INFO] [stdout] | [INFO] [stdout] 1098 | ... Err(PolicyError::IoError(std::io::Error::new( [INFO] [stdout] | ________________________________________________^ [INFO] [stdout] 1099 | | ... std::io::ErrorKind::Other, [INFO] [stdout] 1100 | | ... format!("Seek failed: {}", e) [INFO] [stdout] 1101 | | ... ))) [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 1098 ~ Err(PolicyError::IoError(std::io::Error::other( [INFO] [stdout] 1099 ~ format!("Seek failed: {}", e) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: usage of `contains_key` followed by `insert` on a `HashMap` [INFO] [stdout] --> src/fuse_fs.rs:1811:21 [INFO] [stdout] | [INFO] [stdout] 1811 | / if !inodes.contains_key(&link_ino) { [INFO] [stdout] 1812 | | // New inode (shouldn't happen with devino-hash for hard links) [INFO] [stdout] 1813 | | tracing::warn!("Hard link created new inode {} - expected to share with source", link_ino); [INFO] [stdout] 1814 | | inodes.insert(link_ino, InodeData { [INFO] [stdout] ... | [INFO] [stdout] 1833 | | drop(inodes); [INFO] [stdout] 1834 | | } [INFO] [stdout] | |_____________________^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_entry [INFO] [stdout] help: try [INFO] [stdout] | [INFO] [stdout] 1811 ~ if let std::collections::hash_map::Entry::Vacant(e) = inodes.entry(link_ino) { [INFO] [stdout] 1812 + // New inode (shouldn't happen with devino-hash for hard links) [INFO] [stdout] 1813 + tracing::warn!("Hard link created new inode {} - expected to share with source", link_ino); [INFO] [stdout] 1814 + e.insert(InodeData { [INFO] [stdout] 1815 + path: link_path_str.clone(), [INFO] [stdout] 1816 + attr, [INFO] [stdout] 1817 + content_lock: Arc::new(parking_lot::RwLock::new(())), [INFO] [stdout] 1818 + branch_idx: Some(branch_idx), [INFO] [stdout] 1819 + original_ino, [INFO] [stdout] 1820 + }); [INFO] [stdout] 1821 + drop(inodes); [INFO] [stdout] 1822 + } else { [INFO] [stdout] 1823 + // Existing inode - refresh attributes to get updated nlink [INFO] [stdout] 1824 + tracing::info!("Hard link shares inode {} with source", link_ino); [INFO] [stdout] 1825 + if let Some((fresh_attr, _, _)) = self.create_file_attr_with_branch(&link_path) { [INFO] [stdout] 1826 + // Update the cached attributes with fresh nlink count [INFO] [stdout] 1827 + if let Some(inode_data) = inodes.get_mut(&link_ino) { [INFO] [stdout] 1828 + inode_data.attr.nlink = fresh_attr.nlink; [INFO] [stdout] 1829 + inode_data.attr.mtime = fresh_attr.mtime; [INFO] [stdout] 1830 + inode_data.attr.ctime = fresh_attr.ctime; [INFO] [stdout] 1831 + } [INFO] [stdout] 1832 + } [INFO] [stdout] 1833 + drop(inodes); [INFO] [stdout] 1834 + } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `impl` can be derived [INFO] [stdout] --> src/inode.rs:24:1 [INFO] [stdout] | [INFO] [stdout] 24 | / impl Default for InodeCalc { [INFO] [stdout] 25 | | fn default() -> Self { [INFO] [stdout] 26 | | InodeCalc::HybridHash [INFO] [stdout] 27 | | } [INFO] [stdout] 28 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls [INFO] [stdout] help: replace the manual implementation with a derive attribute and mark the default variant [INFO] [stdout] | [INFO] [stdout] 7 + #[derive(Default)] [INFO] [stdout] 8 | pub enum InodeCalc { [INFO] [stdout] 9 | /// Use the original inode from the underlying filesystem [INFO] [stdout] ... [INFO] [stdout] 19 | /// Use path-hash for directories, devino-hash for files (default) [INFO] [stdout] 20 ~ #[default] [INFO] [stdout] 21 ~ HybridHash, [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: methods with the following characteristics: (`to_*` and `self` type is `Copy`) usually take `self` by value [INFO] [stdout] --> src/inode.rs:46:22 [INFO] [stdout] | [INFO] [stdout] 46 | pub fn to_string(&self) -> &'static str { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider choosing a less ambiguous name [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#wrong_self_convention [INFO] [stdout] = note: `#[warn(clippy::wrong_self_convention)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/integration_tests.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / mod integration_tests { [INFO] [stdout] 3 | | use crate::branch::{Branch, BranchMode}; [INFO] [stdout] 4 | | use crate::file_ops::FileManager; [INFO] [stdout] 5 | | use crate::policy::FirstFoundCreatePolicy; [INFO] [stdout] ... | [INFO] [stdout] 170 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] = note: `#[warn(clippy::module_inception)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/fuse_integration_tests.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / mod fuse_integration_tests { [INFO] [stdout] 3 | | use crate::branch::{Branch, BranchMode}; [INFO] [stdout] 4 | | use crate::file_ops::FileManager; [INFO] [stdout] 5 | | use crate::fuse_fs::MergerFS; [INFO] [stdout] ... | [INFO] [stdout] 1028 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: manually reimplementing `div_ceil` [INFO] [stdout] --> src/fuse_integration_tests.rs:297:33 [INFO] [stdout] | [INFO] [stdout] 297 | assert_eq!(attr.blocks, (10000 + 511) / 512, "Block count should be calculated correctly"); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ help: consider using `.div_ceil()`: `10000_u64.div_ceil(512)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#manual_div_ceil [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: module has the same name as its containing module [INFO] [stdout] --> src/directory_ops_tests.rs:2:1 [INFO] [stdout] | [INFO] [stdout] 2 | / mod directory_ops_tests { [INFO] [stdout] 3 | | use crate::branch::{Branch, BranchMode}; [INFO] [stdout] 4 | | use crate::file_ops::FileManager; [INFO] [stdout] 5 | | use crate::policy::FirstFoundCreatePolicy; [INFO] [stdout] ... | [INFO] [stdout] 267 | | } [INFO] [stdout] | |_^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_inception [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this can be `std::io::Error::other(_)` [INFO] [stdout] --> src/rename_ops.rs:303:17 [INFO] [stdout] | [INFO] [stdout] 303 | io::Error::new(io::ErrorKind::Other, "No rename succeeded") [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#io_other_error [INFO] [stdout] help: use `std::io::Error::other` [INFO] [stdout] | [INFO] [stdout] 303 - io::Error::new(io::ErrorKind::Other, "No rename succeeded") [INFO] [stdout] 303 + io::Error::other("No rename succeeded") [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this `if let` can be collapsed into the outer `if let` [INFO] [stdout] --> src/moveonenospc.rs:245:25 [INFO] [stdout] | [INFO] [stdout] 245 | / if let Some(value) = value { [INFO] [stdout] 246 | | let _ = set(dst, &attr, &value); [INFO] [stdout] 247 | | } [INFO] [stdout] | |_________________________^ [INFO] [stdout] | [INFO] [stdout] help: the outer pattern can be modified to include the inner pattern [INFO] [stdout] --> src/moveonenospc.rs:244:31 [INFO] [stdout] | [INFO] [stdout] 244 | if let Ok(value) = get(src, &attr) { [INFO] [stdout] | ^^^^^ replace this binding [INFO] [stdout] 245 | if let Some(value) = value { [INFO] [stdout] | ^^^^^^^^^^^ with this pattern [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_match [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: match expression looks like `matches!` macro [INFO] [stdout] --> src/moveonenospc.rs:298:5 [INFO] [stdout] | [INFO] [stdout] 298 | / match error.raw_os_error() { [INFO] [stdout] 299 | | Some(ENOSPC) => true, [INFO] [stdout] 300 | | Some(EDQUOT) => true, [INFO] [stdout] 301 | | _ => false, [INFO] [stdout] 302 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_like_matches_macro [INFO] [stdout] = note: `#[warn(clippy::match_like_matches_macro)]` on by default [INFO] [stdout] help: use `matches!` directly [INFO] [stdout] | [INFO] [stdout] 298 - match error.raw_os_error() { [INFO] [stdout] 299 - Some(ENOSPC) => true, [INFO] [stdout] 300 - Some(EDQUOT) => true, [INFO] [stdout] 301 - _ => false, [INFO] [stdout] 302 - } [INFO] [stdout] 298 + matches!(error.raw_os_error(), Some(ENOSPC) | Some(EDQUOT)) [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:61:30 [INFO] [stdout] | [INFO] [stdout] 61 | assert!(fs::metadata(&branch.full_path(Path::new("/dir1"))).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch.full_path(Path::new("/dir1"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] = note: `#[warn(clippy::needless_borrows_for_generic_args)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:62:30 [INFO] [stdout] | [INFO] [stdout] 62 | assert!(fs::metadata(&branch.full_path(Path::new("/dir1/dir2"))).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch.full_path(Path::new("/dir1/dir2"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:90:38 [INFO] [stdout] | [INFO] [stdout] 90 | let mut perms = fs::metadata(&branch1_path.join("parent")).unwrap().permissions(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch1_path.join("parent")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:92:29 [INFO] [stdout] | [INFO] [stdout] 92 | fs::set_permissions(&branch1_path.join("parent"), perms).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch1_path.join("parent")` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:111:30 [INFO] [stdout] | [INFO] [stdout] 111 | assert!(fs::metadata(&branch2.full_path(Path::new("/parent"))).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch2.full_path(Path::new("/parent"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:112:30 [INFO] [stdout] | [INFO] [stdout] 112 | assert!(fs::metadata(&branch2.full_path(Path::new("/parent/subdir"))).is_ok()); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch2.full_path(Path::new("/parent/subdir"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/symlink_tests.rs:115:41 [INFO] [stdout] | [INFO] [stdout] 115 | let cloned_perms = fs::metadata(&branch2.full_path(Path::new("/parent"))).unwrap().permissions(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch2.full_path(Path::new("/parent"))` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/link_tests.rs:222:39 [INFO] [stdout] | [INFO] [stdout] 222 | let link1_meta = fs::metadata(&branch.full_path(link1_path)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch.full_path(link1_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/link_tests.rs:223:39 [INFO] [stdout] | [INFO] [stdout] 223 | let link2_meta = fs::metadata(&branch.full_path(link2_path)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch.full_path(link2_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: the borrowed expression implements the required traits [INFO] [stdout] --> src/link_tests.rs:260:38 [INFO] [stdout] | [INFO] [stdout] 260 | let link_meta = fs::metadata(&branch.full_path(link_path)).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `branch.full_path(link_path)` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrows_for_generic_args [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: this expression creates a reference which is immediately dereferenced by the compiler [INFO] [stdout] --> src/inode_integration_test.rs:181:47 [INFO] [stdout] | [INFO] [stdout] 181 | let attr = merger_fs.create_file_attr(&Path::new("/test.txt")).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("/test.txt")` [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/inode_integration_test.rs:187:48 [INFO] [stdout] | [INFO] [stdout] 187 | let attr2 = merger_fs.create_file_attr(&Path::new("/test.txt")).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `Path::new("/test.txt")` [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: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:138:9 [INFO] [stdout] | [INFO] [stdout] 138 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] = note: `#[warn(clippy::println_empty_string)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:140:9 [INFO] [stdout] | [INFO] [stdout] 140 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:143:9 [INFO] [stdout] | [INFO] [stdout] 143 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:149:9 [INFO] [stdout] | [INFO] [stdout] 149 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:155:9 [INFO] [stdout] | [INFO] [stdout] 155 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: empty string literal in `println!` [INFO] [stdout] --> src/main.rs:158:9 [INFO] [stdout] | [INFO] [stdout] 158 | println!(""); [INFO] [stdout] | ^^^^^^^^^--^ [INFO] [stdout] | | [INFO] [stdout] | help: remove the empty string [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#println_empty_string [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/fuse_integration_tests.rs:968:24 [INFO] [stdout] | [INFO] [stdout] 968 | let branches = vec![Arc::new(Branch::new(branch1.clone(), BranchMode::ReadWrite))]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[Arc::new(Branch::new(branch1.clone(), BranchMode::ReadWrite))]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] = note: `#[warn(clippy::useless_vec)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/rename_strategy_tests.rs:117:22 [INFO] [stdout] | [INFO] [stdout] 117 | let _temps = vec![temp1, temp2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[temp1, temp2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: useless use of `vec!` [INFO] [stdout] --> src/rename_strategy_tests.rs:169:22 [INFO] [stdout] | [INFO] [stdout] 169 | let _temps = vec![temp1, temp2]; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ help: you can use an array directly: `[temp1, temp2]` [INFO] [stdout] | [INFO] [stdout] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_vec [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 19.11s [INFO] running `Command { std: "docker" "inspect" "1bda91d33b3efd251dc9ce85f3aa4c03580007fabf6406803c7e7586e168256e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "1bda91d33b3efd251dc9ce85f3aa4c03580007fabf6406803c7e7586e168256e", kill_on_drop: false }` [INFO] [stdout] 1bda91d33b3efd251dc9ce85f3aa4c03580007fabf6406803c7e7586e168256e