Merge pull request #1062 from gwenn/clippy

Fix clippy warnings
This commit is contained in:
gwenn 2021-12-18 08:54:38 +01:00 committed by GitHub
commit 08b78a47e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -289,7 +289,7 @@ mod build_bundled {
} }
fn env(name: &str) -> Option<OsString> { fn env(name: &str) -> Option<OsString> {
let prefix = env::var("TARGET").unwrap().to_uppercase().replace("-", "_"); let prefix = env::var("TARGET").unwrap().to_uppercase().replace('-', "_");
let prefixed = format!("{}_{}", prefix, name); let prefixed = format!("{}_{}", prefix, name);
let var = env::var_os(&prefixed); let var = env::var_os(&prefixed);

View File

@ -730,7 +730,7 @@ impl InnerConnection {
pub fn escape_double_quote(identifier: &str) -> Cow<'_, str> { pub fn escape_double_quote(identifier: &str) -> Cow<'_, str> {
if identifier.contains('"') { if identifier.contains('"') {
// escape quote by doubling them // escape quote by doubling them
Owned(identifier.replace("\"", "\"\"")) Owned(identifier.replace('"', "\"\""))
} else { } else {
Borrowed(identifier) Borrowed(identifier)
} }