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 ca931b6522
commit c55e6991b8
15 changed files with 31 additions and 37 deletions
+2 -3
View File
@@ -83,7 +83,7 @@ fn http_get(url: &str) -> Result<Vec<u8>> {
let (mut host, mut port, mut path) = parse_url(url)?;
for _ in 0..5 {
let addr = format!("{}:{}", host, port);
let addr = format!("{host}:{port}");
let mut stream =
TcpStream::connect(&addr).map_err(|_| Error::KeydbConnect { host: host.clone() })?;
stream
@@ -91,8 +91,7 @@ fn http_get(url: &str) -> Result<Vec<u8>> {
.ok();
let request = format!(
"GET {} HTTP/1.1\r\nHost: {}\r\nConnection: close\r\nAccept-Encoding: identity\r\n\r\n",
path, host
"GET {path} HTTP/1.1\r\nHost: {host}\r\nConnection: close\r\nAccept-Encoding: identity\r\n\r\n"
);
stream
.write_all(request.as_bytes())