From 5e5b1bba510179a1c50f34b3a239f1913e7be78d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Barv=C3=AD=C5=99?= Date: Sat, 1 Apr 2023 15:53:13 +0200 Subject: Needless clone, borrows, casts and lifetimes (#504) --- cli/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cli/src') diff --git a/cli/src/main.rs b/cli/src/main.rs index 95bafa65..e8b08bdb 100644 --- a/cli/src/main.rs +++ b/cli/src/main.rs @@ -279,7 +279,7 @@ fn compile_once(world: &mut SystemWorld, command: &CompileSettings) -> StrResult // Print diagnostics. Err(errors) => { status(command, Status::Error).unwrap(); - print_diagnostics(&world, *errors) + print_diagnostics(world, *errors) .map_err(|_| "failed to print diagnostics")?; Ok(true) } @@ -576,10 +576,10 @@ impl PathHash { /// Read a file. fn read(path: &Path) -> FileResult> { let f = |e| FileError::from_io(e, path); - if fs::metadata(&path).map_err(f)?.is_dir() { + if fs::metadata(path).map_err(f)?.is_dir() { Err(FileError::IsDirectory) } else { - fs::read(&path).map_err(f) + fs::read(path).map_err(f) } } -- cgit v1.2.3