refactor(storage): drop single-caller sanitize_filename wrapper
`FileSystemStorage::sanitize_filename` was a one-line forwarder to `crate::sanitize_filename` with a single call site in `task_file_path`. The extra method added a layer of indirection without value. Inline the crate-level call.
This commit is contained in:
parent
1fcc6e7f6d
commit
a9fac2c1d8
|
|
@ -236,12 +236,8 @@ impl FileSystemStorage {
|
||||||
Ok(path)
|
Ok(path)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn sanitize_filename(name: &str) -> String {
|
|
||||||
crate::sanitize_filename(name)
|
|
||||||
}
|
|
||||||
|
|
||||||
fn task_file_path(&self, list_dir: &Path, task: &Task) -> PathBuf {
|
fn task_file_path(&self, list_dir: &Path, task: &Task) -> PathBuf {
|
||||||
let safe_title = Self::sanitize_filename(&task.title);
|
let safe_title = crate::sanitize_filename(&task.title);
|
||||||
let filename = if safe_title.is_empty() {
|
let filename = if safe_title.is_empty() {
|
||||||
task.id.to_string()
|
task.id.to_string()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue