summaryrefslogtreecommitdiffstats
path: root/src/diff.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/diff.rs')
-rw-r--r--src/diff.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/diff.rs b/src/diff.rs
index bd08468a..1aaca4f4 100644
--- a/src/diff.rs
+++ b/src/diff.rs
@@ -1,7 +1,6 @@
#![cfg(feature = "git")]
use std::collections::HashMap;
-use std::ffi::OsStr;
use std::fs;
use std::path::Path;
@@ -17,7 +16,7 @@ pub enum LineChange {
pub type LineChanges = HashMap<u32, LineChange>;
-pub fn get_git_diff(filename: &OsStr) -> Option<LineChanges> {
+pub fn get_git_diff(filename: &Path) -> Option<LineChanges> {
let repo = Repository::discover(&filename).ok()?;
let repo_path_absolute = fs::canonicalize(repo.workdir()?).ok()?;