From ff7cf3b09916c04ff861047db2b5005621d0597a Mon Sep 17 00:00:00 2001 From: Artur Kovacs Date: Sun, 24 Jan 2021 17:16:52 +0100 Subject: [PATCH] Ran fmt and fix for warning --- src/lib.rs | 7 +++---- src/tests.rs | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 22d322b..70e70ad 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,4 @@ - -use std::{error, env::current_dir, fmt, fs::symlink_metadata, path::Path}; +use std::{env::current_dir, error, fmt, path::Path}; #[cfg(test)] mod tests; @@ -171,8 +170,8 @@ where .map(|x| { let target_ref = x.as_ref(); let target = if target_ref.is_relative() { - let curr_dir = current_dir().map_err(|_| { - Error::CouldNotAccess { target: "[Current working directory]".into() } + let curr_dir = current_dir().map_err(|_| Error::CouldNotAccess { + target: "[Current working directory]".into(), })?; curr_dir.join(target_ref) } else { diff --git a/src/tests.rs b/src/tests.rs index 87afb9c..d638244 100644 --- a/src/tests.rs +++ b/src/tests.rs @@ -80,8 +80,8 @@ fn test_delete_all() { mod unix { #[allow(deprecated)] use crate::{delete, remove}; + use std::fs::{create_dir, remove_dir_all, remove_file, File}; use std::os::unix::fs::symlink; - use std::fs::{File, create_dir, remove_file, remove_dir_all}; use std::path::Path;