fix(build): complete strict lint and test cleanup (replacement for #476)

This commit is contained in:
Chummy 2026-02-17 23:19:55 +08:00
parent fc6e8eb521
commit 0aa35eb669
9 changed files with 24 additions and 34 deletions

View file

@ -412,10 +412,7 @@ impl Provider for ReliableProvider {
// Convert channel receiver to stream
return stream::unfold(rx, |mut rx| async move {
match rx.recv().await {
Some(chunk) => Some((chunk, rx)),
None => None,
}
rx.recv().await.map(|chunk| (chunk, rx))
})
.boxed();
}

View file

@ -140,7 +140,7 @@ impl StreamChunk {
/// Estimate tokens (rough approximation: ~4 chars per token).
pub fn with_token_estimate(mut self) -> Self {
self.token_count = (self.delta.len() + 3) / 4;
self.token_count = self.delta.len().div_ceil(4);
self
}
}