fix(build): complete strict lint and test cleanup (replacement for #476)
This commit is contained in:
parent
fc6e8eb521
commit
0aa35eb669
9 changed files with 24 additions and 34 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue