Returns true if the given drive name is valid.
(s: &str)
| 198 | |
| 199 | /// Returns true if the given drive name is valid. |
| 200 | fn is_valid(s: &str) -> bool { |
| 201 | !s.is_empty() && !s.chars().any(|c| c == ':' || c == '\\' || c == '/' || c == '.') |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | impl fmt::Display for DriveKey { |