mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-21 07:20:41 +00:00
chore: update toolchain to 2024-12-25 (#5430)
* chore: update toolchain to 2024-12-25 * chore: fix clippy * feat: update flakes * chore: remove `rerun-if-changed` for now * chore: update shadow-rs * fix: clippy * chore: update version in DEV_BUILDER_IMAGE_TAG --------- Co-authored-by: Ning Sun <sunning@greptime.com>
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
#![feature(assert_matches)]
|
||||
#![feature(btree_extract_if)]
|
||||
#![feature(async_closure)]
|
||||
#![feature(let_chains)]
|
||||
#![feature(extract_if)]
|
||||
#![feature(hash_extract_if)]
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -16,14 +16,9 @@ use std::collections::BTreeSet;
|
||||
use std::env;
|
||||
|
||||
use build_data::{format_timestamp, get_source_time};
|
||||
use shadow_rs::{CARGO_METADATA, CARGO_TREE};
|
||||
use shadow_rs::{BuildPattern, ShadowBuilder, 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() {
|
||||
@@ -39,10 +34,14 @@ fn main() -> shadow_rs::SdResult<()> {
|
||||
// made as a submodule in another repo.
|
||||
let src_path = env::var("CARGO_WORKSPACE_DIR").or_else(|_| env::var("CARGO_MANIFEST_DIR"))?;
|
||||
let out_path = env::var("OUT_DIR")?;
|
||||
let _ = shadow_rs::Shadow::build_with(
|
||||
src_path,
|
||||
out_path,
|
||||
BTreeSet::from([CARGO_METADATA, CARGO_TREE]),
|
||||
)?;
|
||||
|
||||
let _ = ShadowBuilder::builder()
|
||||
.build_pattern(BuildPattern::Lazy)
|
||||
.src_path(src_path)
|
||||
.out_path(out_path)
|
||||
.deny_const(BTreeSet::from([CARGO_METADATA, CARGO_TREE]))
|
||||
.build()
|
||||
.unwrap();
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user