Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update toolchain to 2024-12-25 #5430

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
125 changes: 85 additions & 40 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
mold
(fenix.packages.${system}.fromToolchainFile {
dir = ./.;
sha256 = "sha256-9GnMWM2pjzawUuVU7EbnPMn79rMknaA4EaxipyTgqig=";
sha256 = "sha256-f/CVA1EC61EWbh0SjaRNhLL0Ypx2ObupbzigZp8NmL4=";
})
cargo-nextest
cargo-llvm-cov
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = "nightly-2024-10-19"
channel = "nightly-2024-12-25"
components = ["rust-analyzer", "llvm-tools"]
2 changes: 1 addition & 1 deletion src/api/src/v1/column_def.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub fn options_from_column_schema(column_schema: &ColumnSchema) -> Option<Column
pub fn contains_fulltext(options: &Option<ColumnOptions>) -> bool {
options
.as_ref()
.map_or(false, |o| o.options.contains_key(FULLTEXT_GRPC_KEY))
.is_some_and(|o| o.options.contains_key(FULLTEXT_GRPC_KEY))
}

/// Tries to construct a `ColumnOptions` from the given `FulltextOptions`.
Expand Down
2 changes: 1 addition & 1 deletion src/catalog/src/kvbackend/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ impl KvBackend for CachedKvBackend {
.lock()
.unwrap()
.as_ref()
.map_or(false, |v| !self.validate_version(*v))
.is_some_and(|v| !self.validate_version(*v))
{
self.cache.invalidate(key).await;
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/datasource/src/file_format/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ struct Test<'a, T: FileOpener> {
expected: Vec<&'a str>,
}

impl<'a, T: FileOpener> Test<'a, T> {
impl<T: FileOpener> Test<'_, T> {
pub async fn run(self) {
let result = FileStream::new(
&self.config,
Expand Down
2 changes: 1 addition & 1 deletion src/common/decimal/src/decimal128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl FromStr for Decimal128 {
type Err = Error;

fn from_str(s: &str) -> Result<Self, Self::Err> {
let len = s.as_bytes().len();
let len = s.len();
if len <= BYTES_TO_OVERFLOW_RUST_DECIMAL {
let rd = RustDecimal::from_str_exact(s).context(ParseRustDecimalStrSnafu { raw: s })?;
Ok(Self::from(rd))
Expand Down
2 changes: 1 addition & 1 deletion src/common/meta/src/ddl/drop_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ impl DropTableProcedure {
})
}

pub(crate) async fn on_prepare<'a>(&mut self) -> Result<Status> {
pub(crate) async fn on_prepare(&mut self) -> Result<Status> {
if self.executor.on_prepare(&self.context).await?.stop() {
return Ok(Status::done());
}
Expand Down
2 changes: 1 addition & 1 deletion src/common/meta/src/key/txn_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ impl TxnOpGetResponseSet {
impl From<&mut Vec<TxnOpResponse>> for TxnOpGetResponseSet {
fn from(value: &mut Vec<TxnOpResponse>) -> Self {
let value = value
.extract_if(|resp| matches!(resp, TxnOpResponse::ResponseGet(_)))
.extract_if(.., |resp| matches!(resp, TxnOpResponse::ResponseGet(_)))
.flat_map(|resp| {
// Safety: checked
let TxnOpResponse::ResponseGet(r) = resp else {
Expand Down
1 change: 0 additions & 1 deletion src/common/meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@

#![feature(assert_matches)]
#![feature(btree_extract_if)]
#![feature(async_closure)]
#![feature(let_chains)]
#![feature(extract_if)]
#![feature(hash_extract_if)]
Expand Down
5 changes: 1 addition & 4 deletions src/common/query/src/logical_plan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,10 +92,7 @@ pub fn rename_logical_plan_columns(
};

let (qualifier_rename, field_rename) =
match plan.schema().qualified_field_from_column(&old_column) {
Ok(qualifier_and_field) => qualifier_and_field,
Err(err) => return Err(err),
};
plan.schema().qualified_field_from_column(&old_column)?;

for (qualifier, field) in plan.schema().iter() {
if qualifier.eq(&qualifier_rename) && field.as_ref() == field_rename {
Expand Down
5 changes: 0 additions & 5 deletions src/common/version/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ use build_data::{format_timestamp, get_source_time};
use shadow_rs::{CARGO_METADATA, CARGO_TREE};

fn main() -> shadow_rs::SdResult<()> {
println!(
"cargo:rerun-if-changed={}/.git/refs/heads",
env!("CARGO_RUSTC_CURRENT_DIR")
);

println!(
"cargo:rustc-env=SOURCE_TIMESTAMP={}",
if let Ok(t) = get_source_time() {
Expand Down
4 changes: 2 additions & 2 deletions src/datatypes/src/types/vector_type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ pub fn parse_string_to_vector_type_value(s: &str, dim: Option<u32>) -> Result<Ve
let content = trimmed[1..trimmed.len() - 1].trim();

if content.is_empty() {
if dim.map_or(false, |d| d != 0) {
if dim.is_some_and(|d| d != 0) {
return InvalidVectorSnafu {
msg: format!("Failed to parse {s} to Vector value: wrong dimension"),
}
Expand All @@ -139,7 +139,7 @@ pub fn parse_string_to_vector_type_value(s: &str, dim: Option<u32>) -> Result<Ve
.collect::<Result<Vec<f32>>>()?;

// Check dimension
if dim.map_or(false, |d| d as usize != elements.len()) {
if dim.is_some_and(|d| d as usize != elements.len()) {
return InvalidVectorSnafu {
msg: format!("Failed to parse {s} to Vector value: wrong dimension"),
}
Expand Down
3 changes: 1 addition & 2 deletions src/flow/src/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,8 +320,7 @@ impl VectorDiff {

fn try_new(vector: VectorRef, diff: Option<VectorRef>) -> Result<Self, EvalError> {
ensure!(
diff.as_ref()
.map_or(true, |diff| diff.len() == vector.len()),
diff.as_ref().is_none_or(|diff| diff.len() == vector.len()),
InvalidArgumentSnafu {
reason: "Length of vector and diff should be the same"
}
Expand Down
Loading
Loading