Refactoring in Rust: Abstraction with the Newtype Pattern
DRANK
The following piece of code takes a PathBuf and extracts the file name, eventually converting it to an owned String.
The following piece of code takes a PathBuf and extracts the file name, eventually converting it to an owned String.