chore: fix all clippy warnings and add Cargo.toml metadata
This commit is contained in:
@@ -1431,7 +1431,7 @@ mod tests {
|
||||
fn rewrite_function_calls_in_response(json: &mut Value) -> bool {
|
||||
let mut changed = false;
|
||||
|
||||
fn rewrite_candidates(candidates: &mut Vec<Value>) -> bool {
|
||||
fn rewrite_candidates(candidates: &mut [Value]) -> bool {
|
||||
let mut changed = false;
|
||||
for candidate in candidates.iter_mut() {
|
||||
if let Some(parts) = candidate
|
||||
@@ -1504,12 +1504,7 @@ impl ResponseRewriter {
|
||||
let mut output = String::new();
|
||||
|
||||
// Extract all complete lines (terminated by \n)
|
||||
loop {
|
||||
let pos = match self.pending.find('\n') {
|
||||
Some(p) => p,
|
||||
None => break,
|
||||
};
|
||||
|
||||
while let Some(pos) = self.pending.find('\n') {
|
||||
// Include the \n in the extracted line
|
||||
let line = self.pending[..=pos].to_string();
|
||||
self.pending = self.pending[pos + 1..].to_string();
|
||||
|
||||
Reference in New Issue
Block a user