[router] add cargo clippy in CI and fix-up linting errors (#9242)

This commit is contained in:
Jeff Nettleton
2025-08-17 11:03:56 -07:00
committed by GitHub
parent 4d98e48649
commit ce3ca9b02f
17 changed files with 111 additions and 191 deletions

View File

@@ -100,7 +100,7 @@ impl TestContext {
let worker_url = &worker_urls[0];
let response = client
.post(&format!("{}{}", worker_url, endpoint))
.post(format!("{}{}", worker_url, endpoint))
.json(&body)
.send()
.await
@@ -128,8 +128,8 @@ impl TestContext {
if let Ok(bytes) = chunk {
let text = String::from_utf8_lossy(&bytes);
for line in text.lines() {
if line.starts_with("data: ") {
events.push(line[6..].to_string());
if let Some(stripped) = line.strip_prefix("data: ") {
events.push(stripped.to_string());
}
}
}