refactor: replace &PathBuf with &Path to enhance generality

This commit is contained in:
Integral 2024-12-18 00:28:34 +08:00
parent 978c659b72
commit 7eb0d84424
No known key found for this signature in database
GPG key ID: 06313911057DD5A8
8 changed files with 15 additions and 18 deletions

View file

@ -1076,7 +1076,7 @@ impl OutputFilenames {
self.with_directory_and_extension(&self.out_directory, extension)
}
pub fn with_directory_and_extension(&self, directory: &PathBuf, extension: &str) -> PathBuf {
pub fn with_directory_and_extension(&self, directory: &Path, extension: &str) -> PathBuf {
let mut path = directory.join(&self.filestem);
path.set_extension(extension);
path