Skip to content

Commit cb7738e

Browse files
committed
fix: update path type from Path to PathBuf in format_file and print_diff functions
1 parent 30c4e6a commit cb7738e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use std::fs;
22
use std::io::{self, Read};
3-
use std::path::{Path, PathBuf};
3+
use std::path::PathBuf;
44

55
use anyhow::{Context, Result};
66
use clap::Parser;
@@ -67,7 +67,7 @@ fn format_stdin(config: &FormatConfig) -> Result<()> {
6767
}
6868

6969
fn format_file(
70-
path: &Path,
70+
path: &PathBuf,
7171
config: &FormatConfig,
7272
write: bool,
7373
check: bool,
@@ -96,7 +96,7 @@ fn format_file(
9696
Ok(())
9797
}
9898

99-
fn print_diff(original: &str, formatted: &str, path: &Path) {
99+
fn print_diff(original: &str, formatted: &str, path: &PathBuf) {
100100
if original == formatted {
101101
return;
102102
}

0 commit comments

Comments
 (0)