mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-21 23:40:38 +00:00
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:
@@ -15,7 +15,6 @@
|
||||
#![feature(box_patterns)]
|
||||
#![feature(assert_matches)]
|
||||
#![feature(if_let_guard)]
|
||||
#![feature(let_chains)]
|
||||
|
||||
pub mod ast;
|
||||
pub mod dialect;
|
||||
|
||||
@@ -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]
|
||||
|
||||
@@ -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")
|
||||
|
||||
@@ -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(),
|
||||
|
||||
@@ -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()? {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user