3 ms·
Rust prefers explicit, deal-with-the-complexity types. The OP lumped ownership-related types (String/&str) and the nightmare that is filepath encodings (OsStrin
by dpbriggs 6y ago
Rust prefers explicit, deal-with-the-complexity types. The OP lumped ownership-related types (String/&str) and the nightmare that is filepath encodings (OsString/OsStr).
The first case is related to ownership/borrowing as these concepts are fundamental in systems languages.
The second case is a hint that filepaths are more complex than a single string type can represent.