diff options
| author | Marek Barvíř <barvirm@gmail.com> | 2023-04-01 15:53:13 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-01 15:53:13 +0200 |
| commit | 5e5b1bba510179a1c50f34b3a239f1913e7be78d (patch) | |
| tree | 520058fd817fcd4b5f3e523c5f665fed6916b098 /cli/src | |
| parent | 9eb6174b22fa4824869fc5e923b96847c2968462 (diff) | |
Needless clone, borrows, casts and lifetimes (#504)
Diffstat (limited to 'cli/src')
| -rw-r--r-- | cli/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
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<Vec<u8>> { 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) } } |
