[INFO] crate mongo-file-center 0.1.7 is already in cache [INFO] extracting crate mongo-file-center 0.1.7 into work/ex/clippy-test-run/sources/stable/reg/mongo-file-center/0.1.7 [INFO] extracting crate mongo-file-center 0.1.7 into work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/mongo-file-center/0.1.7 [INFO] validating manifest of mongo-file-center-0.1.7 on toolchain stable [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] validating manifest of mongo-file-center-0.1.7 on toolchain stable+rustflags=-Dclippy::into_iter_on_array [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "read-manifest" "--manifest-path" "Cargo.toml"` [INFO] started frobbing mongo-file-center-0.1.7 [INFO] finished frobbing mongo-file-center-0.1.7 [INFO] frobbed toml for mongo-file-center-0.1.7 written to work/ex/clippy-test-run/sources/stable/reg/mongo-file-center/0.1.7/Cargo.toml [INFO] started frobbing mongo-file-center-0.1.7 [INFO] finished frobbing mongo-file-center-0.1.7 [INFO] frobbed toml for mongo-file-center-0.1.7 written to work/ex/clippy-test-run/sources/stable+rustflags=-Dclippy%3A%3Ainto_iter_on_array/reg/mongo-file-center/0.1.7/Cargo.toml [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] running `"/mnt/big/crater/work/local/cargo-home/bin/cargo" "+stable" "fetch" "--locked" "--manifest-path" "Cargo.toml"` [INFO] linting mongo-file-center-0.1.7 against stable for clippy-test-run [INFO] running `"docker" "create" "-v" "/mnt/big/crater/work/local/target-dirs/clippy-test-run/worker-3/stable:/opt/crater/target:rw,Z" "-v" "/mnt/big/crater/work/ex/clippy-test-run/sources/stable/reg/mongo-file-center/0.1.7:/opt/crater/workdir:ro,Z" "-v" "/mnt/big/crater/work/local/cargo-home:/opt/crater/cargo-home:ro,Z" "-v" "/mnt/big/crater/work/local/rustup-home:/opt/crater/rustup-home:ro,Z" "-e" "USER_ID=1000" "-e" "SOURCE_DIR=/opt/crater/workdir" "-e" "MAP_USER_ID=1000" "-e" "CARGO_TARGET_DIR=/opt/crater/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/crater/cargo-home" "-e" "RUSTUP_HOME=/opt/crater/rustup-home" "-w" "/opt/crater/workdir" "-m" "1536M" "--network" "none" "rustops/crates-build-env" "/opt/crater/cargo-home/bin/cargo" "+stable" "clippy" "--frozen" "--all" "--all-targets"` [INFO] [stdout] db76ffe922649658ec5ae9967f0bfce04e46485a912b900d4c41389758383e09 [INFO] running `"docker" "start" "-a" "db76ffe922649658ec5ae9967f0bfce04e46485a912b900d4c41389758383e09"` [INFO] [stderr] Checking base32 v0.4.0 [INFO] [stderr] Checking base64-url v1.1.7 [INFO] [stderr] Checking md-5 v0.7.0 [INFO] [stderr] Checking sha3 v0.8.1 [INFO] [stderr] Checking bson v0.13.0 [INFO] [stderr] Checking scan_fmt v0.1.3 [INFO] [stderr] Checking textnonce v0.6.4 [INFO] [stderr] Checking pbkdf2 v0.2.3 [INFO] [stderr] Checking short-crypt v1.0.6 [INFO] [stderr] Checking mongodb v0.3.12 [INFO] [stderr] Checking mongo-file-center v0.1.7 (/opt/crater/workdir) [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:99:38 [INFO] [stderr] | [INFO] [stderr] 99 | const MAX_FILE_SIZE_THRESHOLD: i32 = 16770000; [INFO] [stderr] | ^^^^^^^^ help: consider: `16_770_000` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:100:42 [INFO] [stderr] | [INFO] [stderr] 100 | const DEFAULT_FILE_SIZE_THRESHOLD: i32 = 255000; [INFO] [stderr] | ^^^^^^ help: consider: `255_000` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:99:38 [INFO] [stderr] | [INFO] [stderr] 99 | const MAX_FILE_SIZE_THRESHOLD: i32 = 16770000; [INFO] [stderr] | ^^^^^^^^ help: consider: `16_770_000` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::unreadable_literal)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: long literal lacking separators [INFO] [stderr] --> src/lib.rs:100:42 [INFO] [stderr] | [INFO] [stderr] 100 | const DEFAULT_FILE_SIZE_THRESHOLD: i32 = 255000; [INFO] [stderr] | ^^^^^^ help: consider: `255_000` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unreadable_literal [INFO] [stderr] [INFO] [stderr] warning: large size difference between variants [INFO] [stderr] --> src/file_data.rs:10:5 [INFO] [stderr] | [INFO] [stderr] 10 | GridFS(File), [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::large_enum_variant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stderr] help: consider boxing the large fields to reduce the total size of the enum [INFO] [stderr] | [INFO] [stderr] 10 | GridFS(Box), [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:200:75 [INFO] [stderr] | [INFO] [stderr] 200 | let mongodb_client = Client::connect(host.as_ref(), port).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:211:133 [INFO] [stderr] | [INFO] [stderr] 211 | file_size_threshold = match collection_settings.find_one(Some(doc! {"_id": SETTING_FILE_SIZE_THRESHOLD}), None).map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:213:92 [INFO] [stderr] | [INFO] [stderr] 213 | let file_size_threshold = file_size_threshold.get_i32("value").map_err(|err| FileCenterError::DocumentError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:222:147 [INFO] [stderr] | [INFO] [stderr] 222 | collection_settings.insert_one(doc! {"_id": SETTING_FILE_SIZE_THRESHOLD, "value": initial_file_size_threshold}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:227:117 [INFO] [stderr] | [INFO] [stderr] 227 | create_time = match collection_settings.find_one(Some(doc! {"_id": SETTING_CREATE_TIME}), None).map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:229:21 [INFO] [stderr] | [INFO] [stderr] 229 | file_size_threshold.get_utc_datetime("value").map_err(|err| FileCenterError::DocumentError(err))?.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*(file_size_threshold.get_utc_datetime("value").map_err(|err| FileCenterError::DocumentError(err))?)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:229:75 [INFO] [stderr] | [INFO] [stderr] 229 | file_size_threshold.get_utc_datetime("value").map_err(|err| FileCenterError::DocumentError(err))?.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:234:123 [INFO] [stderr] | [INFO] [stderr] 234 | collection_settings.insert_one(doc! {"_id": SETTING_CREATE_TIME, "value": now.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:234:95 [INFO] [stderr] | [INFO] [stderr] 234 | collection_settings.insert_one(doc! {"_id": SETTING_CREATE_TIME, "value": now.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^ help: try removing the `clone` call: `now` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:240:109 [INFO] [stderr] | [INFO] [stderr] 240 | version = match collection_settings.find_one(Some(doc! {"_id": SETTING_VERSION}), None).map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:242:68 [INFO] [stderr] | [INFO] [stderr] 242 | let version = version.get_i32("value").map_err(|err| FileCenterError::DocumentError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:258:115 [INFO] [stderr] | [INFO] [stderr] 258 | collection_settings.insert_one(doc! {"_id": SETTING_VERSION, "value": VERSION}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:308:157 [INFO] [stderr] | [INFO] [stderr] 308 | collection_settings.update_one(doc! {"_id": SETTING_FILE_SIZE_THRESHOLD}, doc! {"$set": {"value": file_size_threshold}}, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:351:54 [INFO] [stderr] | [INFO] [stderr] 351 | self.mongo_client_db.drop_database().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:357:77 [INFO] [stderr] | [INFO] [stderr] 357 | self.mongo_client_db.drop_collection(COLLECTION_FILES_NAME).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:358:80 [INFO] [stderr] | [INFO] [stderr] 358 | self.mongo_client_db.drop_collection(COLLECTION_SETTINGS_NAME).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:359:66 [INFO] [stderr] | [INFO] [stderr] 359 | self.mongo_client_db.drop_collection("fs.files").map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:391:63 [INFO] [stderr] | [INFO] [stderr] 391 | let file_size = document.get_i64("file_size").map_err(|err| FileCenterError::DocumentError(err))? as u64; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:412:65 [INFO] [stderr] | [INFO] [stderr] 412 | FileData::GridFS(store.open_id(file_id).map_err(|err| FileCenterError::MongoDBError(err))?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:434:106 [INFO] [stderr] | [INFO] [stderr] 434 | let file_item = collection_files.find_one(Some(doc! {"_id": id.clone()}), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:439:89 [INFO] [stderr] | [INFO] [stderr] 439 | collection_files.delete_one(doc! {"_id": id.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:464:35 [INFO] [stderr] | [INFO] [stderr] 464 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:468:61 [INFO] [stderr] | [INFO] [stderr] 468 | let count = result.get_i32("count").map_err(|err| FileCenterError::DocumentError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:469:69 [INFO] [stderr] | [INFO] [stderr] 469 | let file_size = result.get_i64("file_size").map_err(|err| FileCenterError::DocumentError(err))? as u64; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:472:89 [INFO] [stderr] | [INFO] [stderr] 472 | collection_files.delete_one(doc! {"_id": id.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:478:66 [INFO] [stderr] | [INFO] [stderr] 478 | store.remove_id(file_id).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:497:84 [INFO] [stderr] | [INFO] [stderr] 497 | let (hash_1, hash_2, hash_3, hash_4) = get_hash_by_path(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:514:35 [INFO] [stderr] | [INFO] [stderr] 514 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:528:62 [INFO] [stderr] | [INFO] [stderr] 528 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:530:56 [INFO] [stderr] | [INFO] [stderr] 530 | let metadata = file.metadata().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:545:102 [INFO] [stderr] | [INFO] [stderr] 545 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:546:66 [INFO] [stderr] | [INFO] [stderr] 546 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:550:64 [INFO] [stderr] | [INFO] [stderr] 550 | let c = file.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:556:64 [INFO] [stderr] | [INFO] [stderr] 556 | store_file.write(&buffer[..c]).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:559:48 [INFO] [stderr] | [INFO] [stderr] 559 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:570:62 [INFO] [stderr] | [INFO] [stderr] 570 | file.read_to_end(&mut file_data).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:590:95 [INFO] [stderr] | [INFO] [stderr] 590 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:601:84 [INFO] [stderr] | [INFO] [stderr] 601 | let (hash_1, hash_2, hash_3, hash_4) = get_hash_by_buffer(&buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:624:35 [INFO] [stderr] | [INFO] [stderr] 624 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:645:102 [INFO] [stderr] | [INFO] [stderr] 645 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:647:55 [INFO] [stderr] | [INFO] [stderr] 647 | store_file.write(&buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:649:48 [INFO] [stderr] | [INFO] [stderr] 649 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:673:95 [INFO] [stderr] | [INFO] [stderr] 673 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:693:54 [INFO] [stderr] | [INFO] [stderr] 693 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:715:94 [INFO] [stderr] | [INFO] [stderr] 715 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:717:45 [INFO] [stderr] | [INFO] [stderr] 717 | store_file.write(&temp).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:722:58 [INFO] [stderr] | [INFO] [stderr] 722 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:732:47 [INFO] [stderr] | [INFO] [stderr] 732 | store_file.write(buf).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:735:40 [INFO] [stderr] | [INFO] [stderr] 735 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:758:39 [INFO] [stderr] | [INFO] [stderr] 758 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:762:49 [INFO] [stderr] | [INFO] [stderr] 762 | store.remove_id(id).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:790:99 [INFO] [stderr] | [INFO] [stderr] 790 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:817:54 [INFO] [stderr] | [INFO] [stderr] 817 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:819:48 [INFO] [stderr] | [INFO] [stderr] 819 | let metadata = file.metadata().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:834:94 [INFO] [stderr] | [INFO] [stderr] 834 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:835:58 [INFO] [stderr] | [INFO] [stderr] 835 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:839:56 [INFO] [stderr] | [INFO] [stderr] 839 | let c = file.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:845:56 [INFO] [stderr] | [INFO] [stderr] 845 | store_file.write(&buffer[..c]).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:848:40 [INFO] [stderr] | [INFO] [stderr] 848 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:859:54 [INFO] [stderr] | [INFO] [stderr] 859 | file.read_to_end(&mut file_data).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:885:87 [INFO] [stderr] | [INFO] [stderr] 885 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:914:94 [INFO] [stderr] | [INFO] [stderr] 914 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:916:47 [INFO] [stderr] | [INFO] [stderr] 916 | store_file.write(&buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:918:40 [INFO] [stderr] | [INFO] [stderr] 918 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:948:87 [INFO] [stderr] | [INFO] [stderr] 948 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:964:54 [INFO] [stderr] | [INFO] [stderr] 964 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:985:94 [INFO] [stderr] | [INFO] [stderr] 985 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:987:45 [INFO] [stderr] | [INFO] [stderr] 987 | store_file.write(&temp).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:992:58 [INFO] [stderr] | [INFO] [stderr] 992 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:998:56 [INFO] [stderr] | [INFO] [stderr] 998 | store_file.write(&buffer[..c]).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1001:40 [INFO] [stderr] | [INFO] [stderr] 1001 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1039:91 [INFO] [stderr] | [INFO] [stderr] 1039 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1060:77 [INFO] [stderr] | [INFO] [stderr] 1060 | let mut result = fs_files.find(None, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1064:49 [INFO] [stderr] | [INFO] [stderr] 1064 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1065:66 [INFO] [stderr] | [INFO] [stderr] 1065 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1077:16 [INFO] [stderr] | [INFO] [stderr] 1077 | if files.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1087:49 [INFO] [stderr] | [INFO] [stderr] 1087 | }), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1091:53 [INFO] [stderr] | [INFO] [stderr] 1091 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1092:70 [INFO] [stderr] | [INFO] [stderr] 1092 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1104:20 [INFO] [stderr] | [INFO] [stderr] 1104 | if afs.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!afs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1109:38 [INFO] [stderr] | [INFO] [stderr] 1109 | }, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1120:109 [INFO] [stderr] | [INFO] [stderr] 1120 | let mut result = collection_files.find(Some(COUNT_LTE_ZERO.clone()), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1124:49 [INFO] [stderr] | [INFO] [stderr] 1124 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1125:66 [INFO] [stderr] | [INFO] [stderr] 1125 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1137:16 [INFO] [stderr] | [INFO] [stderr] 1137 | if files.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1142:34 [INFO] [stderr] | [INFO] [stderr] 1142 | }, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1152:109 [INFO] [stderr] | [INFO] [stderr] 1152 | let mut result = collection_files.find(Some(FILE_ID_EXISTS.clone()), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1156:49 [INFO] [stderr] | [INFO] [stderr] 1156 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1157:66 [INFO] [stderr] | [INFO] [stderr] 1157 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1169:16 [INFO] [stderr] | [INFO] [stderr] 1169 | if files.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1178:49 [INFO] [stderr] | [INFO] [stderr] 1178 | }), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1182:53 [INFO] [stderr] | [INFO] [stderr] 1182 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1183:70 [INFO] [stderr] | [INFO] [stderr] 1183 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1195:20 [INFO] [stderr] | [INFO] [stderr] 1195 | if fsfs.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!fsfs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1199:53 [INFO] [stderr] | [INFO] [stderr] 1199 | store.remove_id(id).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: large size difference between variants [INFO] [stderr] --> src/file_data.rs:10:5 [INFO] [stderr] | [INFO] [stderr] 10 | GridFS(File), [INFO] [stderr] | ^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::large_enum_variant)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant [INFO] [stderr] help: consider boxing the large fields to reduce the total size of the enum [INFO] [stderr] | [INFO] [stderr] 10 | GridFS(Box), [INFO] [stderr] | ^^^^^^^^^ [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:200:75 [INFO] [stderr] | [INFO] [stderr] 200 | let mongodb_client = Client::connect(host.as_ref(), port).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::redundant_closure)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:211:133 [INFO] [stderr] | [INFO] [stderr] 211 | file_size_threshold = match collection_settings.find_one(Some(doc! {"_id": SETTING_FILE_SIZE_THRESHOLD}), None).map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:213:92 [INFO] [stderr] | [INFO] [stderr] 213 | let file_size_threshold = file_size_threshold.get_i32("value").map_err(|err| FileCenterError::DocumentError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:222:147 [INFO] [stderr] | [INFO] [stderr] 222 | collection_settings.insert_one(doc! {"_id": SETTING_FILE_SIZE_THRESHOLD, "value": initial_file_size_threshold}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:227:117 [INFO] [stderr] | [INFO] [stderr] 227 | create_time = match collection_settings.find_one(Some(doc! {"_id": SETTING_CREATE_TIME}), None).map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:229:21 [INFO] [stderr] | [INFO] [stderr] 229 | file_size_threshold.get_utc_datetime("value").map_err(|err| FileCenterError::DocumentError(err))?.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try dereferencing it: `*(file_size_threshold.get_utc_datetime("value").map_err(|err| FileCenterError::DocumentError(err))?)` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::clone_on_copy)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:229:75 [INFO] [stderr] | [INFO] [stderr] 229 | file_size_threshold.get_utc_datetime("value").map_err(|err| FileCenterError::DocumentError(err))?.clone() [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:234:123 [INFO] [stderr] | [INFO] [stderr] 234 | collection_settings.insert_one(doc! {"_id": SETTING_CREATE_TIME, "value": now.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: using `clone` on a `Copy` type [INFO] [stderr] --> src/lib.rs:234:95 [INFO] [stderr] | [INFO] [stderr] 234 | collection_settings.insert_one(doc! {"_id": SETTING_CREATE_TIME, "value": now.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^ help: try removing the `clone` call: `now` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:240:109 [INFO] [stderr] | [INFO] [stderr] 240 | version = match collection_settings.find_one(Some(doc! {"_id": SETTING_VERSION}), None).map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:242:68 [INFO] [stderr] | [INFO] [stderr] 242 | let version = version.get_i32("value").map_err(|err| FileCenterError::DocumentError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:258:115 [INFO] [stderr] | [INFO] [stderr] 258 | collection_settings.insert_one(doc! {"_id": SETTING_VERSION, "value": VERSION}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:308:157 [INFO] [stderr] | [INFO] [stderr] 308 | collection_settings.update_one(doc! {"_id": SETTING_FILE_SIZE_THRESHOLD}, doc! {"$set": {"value": file_size_threshold}}, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:351:54 [INFO] [stderr] | [INFO] [stderr] 351 | self.mongo_client_db.drop_database().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:357:77 [INFO] [stderr] | [INFO] [stderr] 357 | self.mongo_client_db.drop_collection(COLLECTION_FILES_NAME).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:358:80 [INFO] [stderr] | [INFO] [stderr] 358 | self.mongo_client_db.drop_collection(COLLECTION_SETTINGS_NAME).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:359:66 [INFO] [stderr] | [INFO] [stderr] 359 | self.mongo_client_db.drop_collection("fs.files").map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:391:63 [INFO] [stderr] | [INFO] [stderr] 391 | let file_size = document.get_i64("file_size").map_err(|err| FileCenterError::DocumentError(err))? as u64; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:412:65 [INFO] [stderr] | [INFO] [stderr] 412 | FileData::GridFS(store.open_id(file_id).map_err(|err| FileCenterError::MongoDBError(err))?) [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:434:106 [INFO] [stderr] | [INFO] [stderr] 434 | let file_item = collection_files.find_one(Some(doc! {"_id": id.clone()}), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:439:89 [INFO] [stderr] | [INFO] [stderr] 439 | collection_files.delete_one(doc! {"_id": id.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:464:35 [INFO] [stderr] | [INFO] [stderr] 464 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:468:61 [INFO] [stderr] | [INFO] [stderr] 468 | let count = result.get_i32("count").map_err(|err| FileCenterError::DocumentError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:469:69 [INFO] [stderr] | [INFO] [stderr] 469 | let file_size = result.get_i64("file_size").map_err(|err| FileCenterError::DocumentError(err))? as u64; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::DocumentError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:472:89 [INFO] [stderr] | [INFO] [stderr] 472 | collection_files.delete_one(doc! {"_id": id.clone()}, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:478:66 [INFO] [stderr] | [INFO] [stderr] 478 | store.remove_id(file_id).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:497:84 [INFO] [stderr] | [INFO] [stderr] 497 | let (hash_1, hash_2, hash_3, hash_4) = get_hash_by_path(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:514:35 [INFO] [stderr] | [INFO] [stderr] 514 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:528:62 [INFO] [stderr] | [INFO] [stderr] 528 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:530:56 [INFO] [stderr] | [INFO] [stderr] 530 | let metadata = file.metadata().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:545:102 [INFO] [stderr] | [INFO] [stderr] 545 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:546:66 [INFO] [stderr] | [INFO] [stderr] 546 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:550:64 [INFO] [stderr] | [INFO] [stderr] 550 | let c = file.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:556:64 [INFO] [stderr] | [INFO] [stderr] 556 | store_file.write(&buffer[..c]).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:559:48 [INFO] [stderr] | [INFO] [stderr] 559 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:570:62 [INFO] [stderr] | [INFO] [stderr] 570 | file.read_to_end(&mut file_data).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:590:95 [INFO] [stderr] | [INFO] [stderr] 590 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:601:84 [INFO] [stderr] | [INFO] [stderr] 601 | let (hash_1, hash_2, hash_3, hash_4) = get_hash_by_buffer(&buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:624:35 [INFO] [stderr] | [INFO] [stderr] 624 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:645:102 [INFO] [stderr] | [INFO] [stderr] 645 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:647:55 [INFO] [stderr] | [INFO] [stderr] 647 | store_file.write(&buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:649:48 [INFO] [stderr] | [INFO] [stderr] 649 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:673:95 [INFO] [stderr] | [INFO] [stderr] 673 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:693:54 [INFO] [stderr] | [INFO] [stderr] 693 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:715:94 [INFO] [stderr] | [INFO] [stderr] 715 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:717:45 [INFO] [stderr] | [INFO] [stderr] 717 | store_file.write(&temp).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:722:58 [INFO] [stderr] | [INFO] [stderr] 722 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:732:47 [INFO] [stderr] | [INFO] [stderr] 732 | store_file.write(buf).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:735:40 [INFO] [stderr] | [INFO] [stderr] 735 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:758:39 [INFO] [stderr] | [INFO] [stderr] 758 | }, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:762:49 [INFO] [stderr] | [INFO] [stderr] 762 | store.remove_id(id).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:790:99 [INFO] [stderr] | [INFO] [stderr] 790 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:817:54 [INFO] [stderr] | [INFO] [stderr] 817 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:819:48 [INFO] [stderr] | [INFO] [stderr] 819 | let metadata = file.metadata().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:834:94 [INFO] [stderr] | [INFO] [stderr] 834 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:835:58 [INFO] [stderr] | [INFO] [stderr] 835 | let mut file = File::open(file_path).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:839:56 [INFO] [stderr] | [INFO] [stderr] 839 | let c = file.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:845:56 [INFO] [stderr] | [INFO] [stderr] 845 | store_file.write(&buffer[..c]).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:848:40 [INFO] [stderr] | [INFO] [stderr] 848 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:859:54 [INFO] [stderr] | [INFO] [stderr] 859 | file.read_to_end(&mut file_data).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:885:87 [INFO] [stderr] | [INFO] [stderr] 885 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:914:94 [INFO] [stderr] | [INFO] [stderr] 914 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:916:47 [INFO] [stderr] | [INFO] [stderr] 916 | store_file.write(&buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:918:40 [INFO] [stderr] | [INFO] [stderr] 918 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:948:87 [INFO] [stderr] | [INFO] [stderr] 948 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:964:54 [INFO] [stderr] | [INFO] [stderr] 964 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:985:94 [INFO] [stderr] | [INFO] [stderr] 985 | let mut store_file: gridfs::file::File = store.create(file_name.clone()).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:987:45 [INFO] [stderr] | [INFO] [stderr] 987 | store_file.write(&temp).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:992:58 [INFO] [stderr] | [INFO] [stderr] 992 | let c = reader.read(&mut buffer).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:998:56 [INFO] [stderr] | [INFO] [stderr] 998 | store_file.write(&buffer[..c]).map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1001:40 [INFO] [stderr] | [INFO] [stderr] 1001 | store_file.flush().map_err(|err| FileCenterError::IOError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::IOError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1039:91 [INFO] [stderr] | [INFO] [stderr] 1039 | let result = collection_files.insert_one(file_item_raw.clone(), None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1060:77 [INFO] [stderr] | [INFO] [stderr] 1060 | let mut result = fs_files.find(None, Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1064:49 [INFO] [stderr] | [INFO] [stderr] 1064 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1065:66 [INFO] [stderr] | [INFO] [stderr] 1065 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1077:16 [INFO] [stderr] | [INFO] [stderr] 1077 | if files.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stderr] | [INFO] [stderr] = note: #[warn(clippy::len_zero)] on by default [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1087:49 [INFO] [stderr] | [INFO] [stderr] 1087 | }), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1091:53 [INFO] [stderr] | [INFO] [stderr] 1091 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1092:70 [INFO] [stderr] | [INFO] [stderr] 1092 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1104:20 [INFO] [stderr] | [INFO] [stderr] 1104 | if afs.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!afs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1109:38 [INFO] [stderr] | [INFO] [stderr] 1109 | }, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1120:109 [INFO] [stderr] | [INFO] [stderr] 1120 | let mut result = collection_files.find(Some(COUNT_LTE_ZERO.clone()), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1124:49 [INFO] [stderr] | [INFO] [stderr] 1124 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1125:66 [INFO] [stderr] | [INFO] [stderr] 1125 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1137:16 [INFO] [stderr] | [INFO] [stderr] 1137 | if files.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1142:34 [INFO] [stderr] | [INFO] [stderr] 1142 | }, None).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1152:109 [INFO] [stderr] | [INFO] [stderr] 1152 | let mut result = collection_files.find(Some(FILE_ID_EXISTS.clone()), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1156:49 [INFO] [stderr] | [INFO] [stderr] 1156 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1157:66 [INFO] [stderr] | [INFO] [stderr] 1157 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1169:16 [INFO] [stderr] | [INFO] [stderr] 1169 | if files.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!files.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1178:49 [INFO] [stderr] | [INFO] [stderr] 1178 | }), Some(options)).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1182:53 [INFO] [stderr] | [INFO] [stderr] 1182 | while result.has_next().map_err(|err| FileCenterError::MongoDBError(err))? { [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1183:70 [INFO] [stderr] | [INFO] [stderr] 1183 | let mut doc = result.next().unwrap().map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] warning: length comparison to zero [INFO] [stderr] --> src/lib.rs:1195:20 [INFO] [stderr] | [INFO] [stderr] 1195 | if fsfs.len() > 0 { [INFO] [stderr] | ^^^^^^^^^^^^^^ help: using `is_empty` is clearer and more explicit: `!fsfs.is_empty()` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_zero [INFO] [stderr] [INFO] [stderr] warning: redundant closure found [INFO] [stderr] --> src/lib.rs:1199:53 [INFO] [stderr] | [INFO] [stderr] 1199 | store.remove_id(id).map_err(|err| FileCenterError::MongoDBError(err))?; [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove closure as shown: `FileCenterError::MongoDBError` [INFO] [stderr] | [INFO] [stderr] = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure [INFO] [stderr] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 26.47s [INFO] running `"docker" "inspect" "db76ffe922649658ec5ae9967f0bfce04e46485a912b900d4c41389758383e09"` [INFO] running `"docker" "rm" "-f" "db76ffe922649658ec5ae9967f0bfce04e46485a912b900d4c41389758383e09"` [INFO] [stdout] db76ffe922649658ec5ae9967f0bfce04e46485a912b900d4c41389758383e09