mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-23 08:20:36 +00:00
build: specify clippy denies in cargo config (#1351)
* build: specify clippy denies in cargo config Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * deny implicit clone Signed-off-by: Ruihang Xia <waynestxia@gmail.com> --------- Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
@@ -115,7 +115,7 @@ impl MysqlInstanceShim {
|
||||
|
||||
fn query(&self, stmt_id: u32) -> Option<String> {
|
||||
let guard = self.prepared_stmts.read();
|
||||
guard.get(&stmt_id).map(|s| s.to_owned())
|
||||
guard.get(&stmt_id).cloned()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -339,7 +339,7 @@ impl ExtendedQueryHandler for PostgresServerHandler {
|
||||
let (_, sql) = portal.statement().statement();
|
||||
|
||||
// manually replace variables in prepared statement
|
||||
let mut sql = sql.to_owned();
|
||||
let mut sql = sql.clone();
|
||||
for i in 0..portal.parameter_len() {
|
||||
sql = sql.replace(&format!("${}", i + 1), ¶meter_to_string(portal, i)?);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ impl FromRow for MysqlTextRow {
|
||||
let value = if let Some(mysql_value) = row.as_ref(i) {
|
||||
match mysql_value {
|
||||
MysqlValue::NULL => Value::Null,
|
||||
MysqlValue::Bytes(v) => Value::from(v.to_vec()),
|
||||
MysqlValue::Bytes(v) => Value::from(v.clone()),
|
||||
_ => unreachable!(),
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user