mirror of
https://github.com/katanemo/plano.git
synced 2026-05-06 22:32:42 +02:00
cargo clippy (#660)
This commit is contained in:
parent
c75e7606f9
commit
ca95ffb63d
62 changed files with 1864 additions and 1187 deletions
|
|
@ -94,8 +94,8 @@ impl StreamContext {
|
|||
fn request_identifier(&self) -> String {
|
||||
self.request_id
|
||||
.as_ref()
|
||||
.filter(|id| !id.is_empty()) // Filter out empty strings
|
||||
.map(|id| id.clone())
|
||||
.filter(|id| !id.is_empty())
|
||||
.cloned()
|
||||
.unwrap_or_else(|| "NO_REQUEST_ID".to_string())
|
||||
}
|
||||
fn llm_provider(&self) -> &LlmProvider {
|
||||
|
|
@ -504,7 +504,7 @@ impl StreamContext {
|
|||
// Get accumulated bytes from buffer and return
|
||||
match self.sse_buffer.as_mut() {
|
||||
Some(buffer) => {
|
||||
let bytes = buffer.into_bytes();
|
||||
let bytes = buffer.to_bytes();
|
||||
if !bytes.is_empty() {
|
||||
let content = String::from_utf8_lossy(&bytes);
|
||||
debug!(
|
||||
|
|
@ -623,7 +623,7 @@ impl StreamContext {
|
|||
// Get accumulated bytes from buffer and return
|
||||
match self.sse_buffer.as_mut() {
|
||||
Some(buffer) => {
|
||||
let bytes = buffer.into_bytes();
|
||||
let bytes = buffer.to_bytes();
|
||||
if !bytes.is_empty() {
|
||||
let content = String::from_utf8_lossy(&bytes);
|
||||
debug!(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue