Преглед изворни кода

refactor(clippy): fix trivial cast

Co-authored-by: Alexander Kozhevnikov <mentalisttraceur@gmail.com>
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
Christina Sørensen пре 2 година
родитељ
комит
df23bfb8cd
1 измењених фајлова са 2 додато и 1 уклоњено
  1. 2 1
      src/fs/feature/git.rs

+ 2 - 1
src/fs/feature/git.rs

@@ -179,7 +179,8 @@ impl GitRepo {
     /// path is the start of a rootwards search for the repository.
     fn discover(path: PathBuf, flags: git2::RepositoryOpenFlags) -> Result<Self, PathBuf> {
         info!("Opening Git repository for {:?} ({:?})", path, flags);
-        let repo = match git2::Repository::open_ext(&path, flags, [] as [&OsStr; 0]) {
+        let unused: [&OsStr; 0] = [];
+        let repo = match git2::Repository::open_ext(&path, flags, &unused) {
             Ok(r) => r,
             Err(e) => {
                 error!("Error opening Git repository for {path:?}: {e:?}");