From e2f55878709190e2ec574443ff38e5dcc66301fd Mon Sep 17 00:00:00 2001 From: kumavale Date: Sun, 24 Mar 2024 17:14:39 +0900 Subject: [PATCH] chore(deps): cargo upgrade & cargo clippy --- concatsql/Cargo.toml | 14 +++++++------- concatsql/src/wrapstring.rs | 2 +- concatsql_macro/src/lib.rs | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/concatsql/Cargo.toml b/concatsql/Cargo.toml index 2cdc558..156d61e 100644 --- a/concatsql/Cargo.toml +++ b/concatsql/Cargo.toml @@ -22,19 +22,19 @@ postgres = ["postgres-sys"] [dependencies] indexmap = "2.2.6" -lazy_static = "1.4" -uuid = "1.8" -chrono = "0.4" +lazy_static = "1.4.0" +uuid = "1.8.0" +chrono = "0.4.35" concatsql_macro = { version = "0.1.0", path = "../concatsql_macro" } [dependencies.sqlite3-sys] -version = "0.16" +version = "0.16.0" default-features = false optional = true [dependencies.mysql-sys] package = "mysql" -version = "20.1" +version = "20.1.0" optional = true [dependencies.postgres-sys] @@ -44,8 +44,8 @@ optional = true features = ["with-uuid-1"] [dev-dependencies] -temporary = "0.7" -uuid = { version = "1.8", features = ["v4"] } +temporary = "0.7.0" +uuid = { version = "1.8.0", features = ["v4"] } [package.metadata.docs.rs] all-features = true diff --git a/concatsql/src/wrapstring.rs b/concatsql/src/wrapstring.rs index 7f94ae0..ba0631c 100644 --- a/concatsql/src/wrapstring.rs +++ b/concatsql/src/wrapstring.rs @@ -149,7 +149,7 @@ impl<'a> WrapString<'a> { if let Some(part) = part { new_part.push_str(part); } else { - new_query.push(Some(Cow::Owned(new_part.drain(..).collect()))); + new_query.push(Some(Cow::Owned(std::mem::take(&mut new_part)))); new_query.push(None); } } diff --git a/concatsql_macro/src/lib.rs b/concatsql_macro/src/lib.rs index d6737b7..288a574 100644 --- a/concatsql_macro/src/lib.rs +++ b/concatsql_macro/src/lib.rs @@ -40,7 +40,7 @@ impl FormatParser { } else { return Err("parse error"); }; - if input != "" { + if !input.is_empty() { return Err("invalid format"); } let mut lits = vec![];