refactor(core,storage): deduplicate code patterns (TODO-014)
Extract PttCapability event construction helper in events.rs. Extract ensure_dir() helper in chanora_storage. Add TODO(refactor) annotations for patterns requiring shared crate or API changes.
This commit is contained in:
@@ -194,6 +194,9 @@ impl ServerPrefetcher {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(refactor): `normalize_host` duplicates `chanora_resolver::normalize_args`
|
||||
// host trimming. Both do `host.trim().to_lowercase()`. Could move to a shared
|
||||
// utility in chanora_protocol or a tiny chanora_common crate if more crates need it.
|
||||
fn normalize_host(host: &str) -> String {
|
||||
host.trim().to_lowercase()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user