From 81f9e982a098f33abe0d90b5b2df5b04cdb10481 Mon Sep 17 00:00:00 2001
From: Andre Moreira Magalhaes <andrunko@gmail.com>
Date: Wed, 21 Jun 2023 09:10:57 -0300
Subject: [PATCH] Fix clippy error

This fixes the following error:

  error: this expression creates a reference which is immediately dereferenced by the compiler
     --> src/main.rs:165:27
      |
  165 |     let units = list_file(&file, endian)?;
      |                           ^^^^^ help: change this to: `file`
      |
      = note: `-D clippy::needless-borrow` implied by `-D warnings`
      = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow

Signed-off-by: Andre Moreira Magalhaes <andrunko@gmail.com>
---
 src/main.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main.rs b/src/main.rs
index be1d40c..52cbd09 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -165,7 +165,7 @@ fn process_file<E: Endianity>(
     endian: E,
     strip_prefix: Option<&String>,
 ) -> Result<Vec<Unit>> {
-    let units = list_file(&file, endian)?;
+    let units = list_file(file, endian)?;
     let units = if let Some(strip) = strip_prefix {
         units
             .iter()
-- 
GitLab