chore: update rust to nightly 2025-10-01 (#7069)

* chore: update rust to nightly 2025-10-01

Signed-off-by: luofucong <luofc@foxmail.com>

* chore: nix update

---------

Signed-off-by: luofucong <luofc@foxmail.com>
Co-authored-by: Ning Sun <sunning@greptime.com>
This commit is contained in:
LFC
2025-10-11 15:30:52 +08:00
committed by GitHub
parent 40e9ce90a7
commit 8fe17d43d5
217 changed files with 523 additions and 647 deletions

View File

@@ -160,7 +160,7 @@ impl<R: Rng + 'static> Generator<CreateTableExpr, R> for CreateTableExprGenerato
builder.columns(columns);
builder.primary_keys(primary_keys);
builder.engine(self.engine.to_string());
builder.engine(self.engine.clone());
builder.if_not_exists(self.if_not_exists);
if self.name.is_empty() {
builder.table_name(self.name_generator.generate(rng));
@@ -170,7 +170,7 @@ impl<R: Rng + 'static> Generator<CreateTableExpr, R> for CreateTableExprGenerato
if !self.with_clause.is_empty() {
let mut options = HashMap::new();
for (key, value) in &self.with_clause {
options.insert(key.to_string(), Value::from(value.to_string()));
options.insert(key.clone(), Value::from(value.clone()));
}
builder.options(options);
}
@@ -239,7 +239,7 @@ impl<R: Rng + 'static> Generator<CreateTableExpr, R> for CreatePhysicalTableExpr
let mut options = HashMap::with_capacity(self.with_clause.len() + 1);
options.insert("physical_metric_table".to_string(), Value::from(""));
for (key, value) in &self.with_clause {
options.insert(key.to_string(), Value::from(value.to_string()));
options.insert(key.clone(), Value::from(value.clone()));
}
Ok(CreateTableExpr {
@@ -357,7 +357,7 @@ impl<R: Rng + 'static> Generator<CreateDatabaseExpr, R> for CreateDatabaseExprGe
if self.database_name.is_empty() {
builder.database_name(self.name_generator.generate(rng));
} else {
builder.database_name(self.database_name.to_string());
builder.database_name(self.database_name.clone());
}
builder.build().context(error::BuildCreateDatabaseExprSnafu)
}
@@ -451,7 +451,7 @@ mod tests {
let physical_ts_name = physical_table_expr.columns[physical_ts.unwrap()]
.name
.value
.to_string();
.clone();
let physical_table_ctx = Arc::new(TableContext::from(&physical_table_expr));
@@ -472,7 +472,7 @@ mod tests {
let logical_ts_name = logical_table_expr.columns[logical_ts.unwrap()]
.name
.value
.to_string();
.clone();
assert_eq!(logical_table_expr.engine, "metric");
assert_eq!(logical_table_expr.columns.len(), 7);

View File

@@ -552,7 +552,6 @@ pub fn format_columns(columns: &[Column]) -> String {
.map(|c| c.name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string()
}
#[cfg(test)]

View File

@@ -41,8 +41,7 @@ impl InsertIntoExprTranslator {
.iter()
.map(|c| c.name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
format!("({})", list)
}

View File

@@ -27,16 +27,14 @@ impl DslTranslator<SelectExpr, String> for SelectExprTranslator {
.iter()
.map(|c| c.name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
let order_by = input
.order_by
.iter()
.map(|c| c.as_str())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
Ok(format!(
"SELECT {} FROM {} ORDER BY {} {};",

View File

@@ -60,7 +60,7 @@ pub async fn fetch_partitions(db: &MySqlPool, table_name: Ident) -> Result<Vec<P
from information_schema.partitions a left join information_schema.region_peers b
on a.greptime_partition_id = b.region_id where a.table_name= ? order by datanode_id asc;";
sqlx::query_as::<_, Partition>(sql)
.bind(table_name.value.to_string())
.bind(table_name.value.clone())
.fetch_all(db)
.await
.context(error::ExecuteQuerySnafu { sql })

View File

@@ -85,7 +85,7 @@ impl PartialEq<Column> for ColumnEntry {
}
let default_value = match default_value_opt.unwrap() {
ColumnOption::DefaultValue(v) => v.to_string(),
ColumnOption::DefaultFn(f) => f.to_string(),
ColumnOption::DefaultFn(f) => f.clone(),
_ => unreachable!(),
};
if &default_value != value {
@@ -204,8 +204,8 @@ pub async fn fetch_columns(
) -> Result<Vec<ColumnEntry>> {
let sql = "SELECT table_schema, table_name, column_name, greptime_data_type as data_type, semantic_type, column_default, is_nullable FROM information_schema.columns WHERE table_schema = ? AND table_name = ?";
sqlx::query_as::<_, ColumnEntry>(sql)
.bind(schema_name.value.to_string())
.bind(table_name.value.to_string())
.bind(schema_name.value.clone())
.bind(table_name.value.clone())
.fetch_all(db)
.await
.context(error::ExecuteQuerySnafu { sql })

View File

@@ -180,16 +180,14 @@ async fn execute_insert(ctx: FuzzContext, input: FuzzInput) -> Result<()> {
.iter()
.map(|&i| insert_expr.columns[i].name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
let column_list = insert_expr
.columns
.iter()
.map(|c| c.name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
let select_sql = format!(
"SELECT {} FROM {} ORDER BY {}",

View File

@@ -174,16 +174,14 @@ async fn validate_values(
.iter()
.map(|&i| insert_expr.columns[i].name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
let column_list = insert_expr
.columns
.iter()
.map(|c| c.name.to_string())
.collect::<Vec<_>>()
.join(", ")
.to_string();
.join(", ");
let select_sql = format!(
"SELECT {} FROM {} ORDER BY {}",

View File

@@ -247,7 +247,7 @@ async fn migrate_regions(ctx: &FuzzContext, migrations: &[Migration]) -> Result<
Duration::from_secs(240),
|| {
let greptime = ctx.greptime.clone();
let procedure_id = procedure_id.to_string();
let procedure_id = procedure_id.clone();
Box::pin(async move {
{
let output = procedure_state(&greptime, &procedure_id).await;