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

@@ -15,7 +15,6 @@
#![feature(box_patterns)]
#![feature(assert_matches)]
#![feature(if_let_guard)]
#![feature(let_chains)]
pub mod ast;
pub mod dialect;

View File

@@ -78,7 +78,6 @@ impl ParserContext<'_> {
.parse_comma_separated(parse_string_option_names)
.context(error::SyntaxSnafu)?
.into_iter()
.map(|name| name.to_string())
.collect();
Ok(AlterDatabase::new(
database_name,
@@ -770,7 +769,7 @@ mod tests {
);
match alter.alter_operation {
AlterTableOperation::AddColumns { add_columns } => {
let expected = vec![
let expected = [
AddColumn {
column_def: ColumnDef {
name: Ident::new("a"),
@@ -1030,8 +1029,7 @@ mod tests {
};
assert_eq!(sql, alter.to_string());
let res = keys.iter().map(|o| o.to_string()).collect::<Vec<_>>();
assert_eq!(expected, &res);
assert_eq!(expected, keys);
}
#[test]

View File

@@ -208,9 +208,7 @@ impl<'a> ParserContext<'a> {
for key in options.keys() {
ensure!(
validate_database_option(key),
InvalidDatabaseOptionSnafu {
key: key.to_string()
}
InvalidDatabaseOptionSnafu { key: key.clone() }
);
}
if let Some(append_mode) = options.get("append_mode")

View File

@@ -379,9 +379,7 @@ impl<'a> ParserContext<'a> {
for key in options.keys() {
ensure!(
validate_webhook_option(key),
error::InvalidTriggerWebhookOptionSnafu {
key: key.to_string()
}
error::InvalidTriggerWebhookOptionSnafu { key: key.clone() }
);
}
@@ -486,7 +484,7 @@ IF NOT EXISTS cpu_monitor
"(SELECT host AS host_label, cpu, memory FROM machine_monitor WHERE cpu > 1)"
);
assert_eq!(*interval, Duration::from_secs(300));
assert_eq!(raw_interval_expr.to_string(), "'5 minute'::INTERVAL");
assert_eq!(raw_interval_expr.clone(), "'5 minute'::INTERVAL");
assert_eq!(create_trigger.labels.len(), 1);
assert_eq!(
create_trigger.labels.get("label_name").unwrap(),

View File

@@ -127,7 +127,7 @@ pub fn column_to_schema(
}) {
let _ = column_schema
.mut_metadata()
.insert(COMMENT_KEY.to_string(), c.to_string());
.insert(COMMENT_KEY.to_string(), c.clone());
}
if let Some(options) = column.extensions.build_fulltext_options()? {

View File

@@ -160,7 +160,7 @@ fn sql_exprs_to_values(exprs: &[Vec<Expr>]) -> Result<Vec<Vec<Value>>> {
{
match op {
UnaryOperator::Minus => Value::Number(format!("-{s}"), *b),
UnaryOperator::Plus => Value::Number(s.to_string(), *b),
UnaryOperator::Plus => Value::Number(s.clone(), *b),
_ => unreachable!(),
}
} else {

View File

@@ -73,7 +73,7 @@ impl OptionMap {
map.extend(
self.secrets
.into_iter()
.map(|(k, v)| (k, v.expose_secret().to_string())),
.map(|(k, v)| (k, v.expose_secret().clone())),
);
map
}

View File

@@ -125,7 +125,7 @@ impl TransformRule for ExpandIntervalTransformRule {
..
}) => {
let interval_value =
normalize_interval_name(value).unwrap_or_else(|| value.to_string());
normalize_interval_name(value).unwrap_or_else(|| value.clone());
*expr = Expr::Cast {
kind: kind.clone(),
expr: single_quoted_string_expr(interval_value),

View File

@@ -62,7 +62,7 @@ pub fn parse_option_string(option: SqlOption) -> Result<(String, String)> {
Expr::Value(ValueWithSpan {
value: Value::Number(v, _),
..
}) => v.to_string(),
}) => v.clone(),
value => return InvalidTableOptionValueSnafu { key, value }.fail(),
};
let k = key.value.to_lowercase();