From 9189b54fc73e1ac4454f6b42447406251345d6b8 Mon Sep 17 00:00:00 2001 From: gwenn Date: Sat, 10 Aug 2024 15:09:26 +0200 Subject: [PATCH] clippy::manual_string_new --- src/types/value.rs | 2 +- src/vtab/csvtab.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types/value.rs b/src/types/value.rs index fbd2625..5c6356f 100644 --- a/src/types/value.rs +++ b/src/types/value.rs @@ -158,7 +158,7 @@ mod test { assert_eq!(Value::Null.data_type(), Type::Null); assert_eq!(Value::Integer(0).data_type(), Type::Integer); assert_eq!(Value::Real(0.).data_type(), Type::Real); - assert_eq!(Value::Text("".to_owned()).data_type(), Type::Text); + assert_eq!(Value::Text(String::new()).data_type(), Type::Text); assert_eq!(Value::Blob(vec![]).data_type(), Type::Blob); } } diff --git a/src/vtab/csvtab.rs b/src/vtab/csvtab.rs index 221fd24..35a1789 100644 --- a/src/vtab/csvtab.rs +++ b/src/vtab/csvtab.rs @@ -98,7 +98,7 @@ unsafe impl<'vtab> VTab<'vtab> for CsvTab { let mut vtab = Self { base: ffi::sqlite3_vtab::default(), - filename: "".to_owned(), + filename: String::new(), has_headers: false, delimiter: b',', quote: b'"',