Skip to content

Commit

Permalink
Clippy Fixes
Browse files Browse the repository at this point in the history
- Addressed a Clippy warning by replacing `push_str("\n")` with `push('\n')` for better performance and code quality.
  • Loading branch information
Tachikoma000 committed Sep 19, 2024
1 parent 5f05baa commit 2babaa3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion rig-core/examples/rag_with_csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ async fn main() -> Result<(), anyhow::Error> {
println!("Agent Response:\n{}", response);

Ok(())
}
}
2 changes: 1 addition & 1 deletion rig-core/src/document_loaders/csv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ impl DocumentLoader for CsvLoader {
for (i, field) in record.iter().enumerate() {
csv_content.push_str(&format!("{}: {}\n", headers[i], field));
}
csv_content.push_str("\n");
csv_content.push('\n'); // Changed from push_str("\n") to push('\n')
}

Ok(vec![DocumentEmbeddings {
Expand Down

0 comments on commit 2babaa3

Please sign in to comment.