diff --git a/rig-core/examples/rag_with_csv.rs b/rig-core/examples/rag_with_csv.rs index 7a9de694..82637eb8 100644 --- a/rig-core/examples/rag_with_csv.rs +++ b/rig-core/examples/rag_with_csv.rs @@ -82,4 +82,4 @@ async fn main() -> Result<(), anyhow::Error> { println!("Agent Response:\n{}", response); Ok(()) -} \ No newline at end of file +} diff --git a/rig-core/src/document_loaders/csv.rs b/rig-core/src/document_loaders/csv.rs index 34b47cf3..ea91e7d8 100644 --- a/rig-core/src/document_loaders/csv.rs +++ b/rig-core/src/document_loaders/csv.rs @@ -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 {