Skip to content

Commit

Permalink
Remove duplicate arg in internal function (#628)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored Oct 1, 2024
1 parent 98842e7 commit bf776f5
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions insta/src/runtime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -174,11 +174,10 @@ fn get_snapshot_filename(
assertion_file: &str,
snapshot_name: &str,
cargo_workspace: &Path,
base: &str,
is_doctest: bool,
) -> PathBuf {
let root = Path::new(cargo_workspace);
let base = Path::new(base);
let base = Path::new(assertion_file);
Settings::with(|settings| {
root.join(base.parent().unwrap())
.join(settings.snapshot_path())
Expand All @@ -190,8 +189,7 @@ fn get_snapshot_filename(
write!(
&mut f,
"doctest_{}__",
Path::new(assertion_file)
.file_name()
base.file_name()
.unwrap()
.to_string_lossy()
.replace('.', "_")
Expand Down Expand Up @@ -268,7 +266,6 @@ impl<'a> SnapshotAssertionContext<'a> {
assertion_file,
&name,
workspace,
assertion_file,
is_doctest,
);
if fs::metadata(&file).is_ok() {
Expand Down

0 comments on commit bf776f5

Please sign in to comment.