Doc comments, format string inlining, long literal separators

- Doc comments on DriveSession, find_drives, all Error variants, Result type
- 24 format! strings inlined (clippy pedantic)
- 25 long hex literals with separators (0xFFFFFFFF → 0xFFFF_FFFF)
- README install example updated to 0.8
This commit is contained in:
MattJackson
2026-04-11 21:04:44 +00:00
parent 1c3f300f2f
commit 9d63ff75e9
15 changed files with 31 additions and 37 deletions
+3 -6
View File
@@ -104,8 +104,7 @@ fn validate_file_path(path: &str, scheme: &str) -> io::Result<()> {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
format!(
"{}:// requires a file path (e.g. {}://movie.{})",
scheme, scheme, scheme
"{scheme}:// requires a file path (e.g. {scheme}://movie.{scheme})"
),
));
}
@@ -114,8 +113,7 @@ fn validate_file_path(path: &str, scheme: &str) -> io::Result<()> {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
format!(
"{}://{} is not a valid file path — must include a filename",
scheme, path
"{scheme}://{path} is not a valid file path — must include a filename"
),
));
}
@@ -134,8 +132,7 @@ fn validate_network_addr(addr: &str) -> io::Result<()> {
return Err(io::Error::new(
io::ErrorKind::InvalidInput,
format!(
"network://{} missing port — use network://{}:PORT",
addr, addr
"network://{addr} missing port — use network://{addr}:PORT"
),
));
}