chore: bump rust to nightly-2023-02-14 (#1019)

* chore: bump rust to nightly-2023-02-14

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* fix clippy

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

* bump statrs to 0.16

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>

---------

Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
This commit is contained in:
Ruihang Xia
2023-02-16 13:17:57 +08:00
committed by GitHub
parent 04afee216e
commit a8c2b35ec6
17 changed files with 41 additions and 30 deletions

View File

@@ -24,7 +24,7 @@ on:
name: CI
env:
RUST_TOOLCHAIN: nightly-2022-12-20
RUST_TOOLCHAIN: nightly-2023-02-14
jobs:
typos:

View File

@@ -10,7 +10,7 @@ on:
name: Release
env:
RUST_TOOLCHAIN: nightly-2022-12-20
RUST_TOOLCHAIN: nightly-2023-02-14
# FIXME(zyy17): Would be better to use `gh release list -L 1 | cut -f 3` to get the latest release version tag, but for a long time, we will stay at 'v0.1.0-alpha-*'.
SCHEDULED_BUILD_VERSION_PREFIX: v0.1.0-alpha

32
Cargo.lock generated
View File

@@ -4183,9 +4183,9 @@ dependencies = [
[[package]]
name = "nalgebra"
version = "0.27.1"
version = "0.29.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120"
checksum = "d506eb7e08d6329505faa8a3a00a5dcc6de9f76e0c77e4b75763ae3c770831ff"
dependencies = [
"approx",
"matrixmultiply",
@@ -6385,6 +6385,15 @@ dependencies = [
"safe-regex-compiler",
]
[[package]]
name = "safe_arch"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529"
dependencies = [
"bytemuck",
]
[[package]]
name = "same-file"
version = "1.0.6"
@@ -6816,14 +6825,15 @@ checksum = "8fe458c98333f9c8152221191a77e2a44e8325d0193484af2e9421a53019e57d"
[[package]]
name = "simba"
version = "0.5.1"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c"
checksum = "f0b7840f121a46d63066ee7a99fc81dcabbc6105e437cae43528cea199b5a05f"
dependencies = [
"approx",
"num-complex",
"num-traits",
"paste",
"wide",
]
[[package]]
@@ -7037,9 +7047,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]]
name = "statrs"
version = "0.15.0"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05"
checksum = "2d08e5e1748192713cc281da8b16924fb46be7b0c2431854eadc785823e5696e"
dependencies = [
"approx",
"lazy_static",
@@ -8539,6 +8549,16 @@ dependencies = [
"once_cell",
]
[[package]]
name = "wide"
version = "0.7.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "feff0a412894d67223777b6cc8d68c0dab06d52d95e9890d5f2d47f10dd9366c"
dependencies = [
"bytemuck",
"safe_arch",
]
[[package]]
name = "widestring"
version = "0.5.1"

View File

@@ -1,2 +1,2 @@
[toolchain]
channel = "nightly-2022-12-20"
channel = "nightly-2023-02-14"

View File

@@ -194,7 +194,7 @@ pub fn push_vals(column: &mut Column, origin_count: usize, vector: VectorRef) {
null_mask.reserve_exact(origin_count + len);
null_mask.extend(BitVec::repeat(false, len));
(0..len).into_iter().for_each(|idx| match vector.get(idx) {
(0..len).for_each(|idx| match vector.get(idx) {
Value::Null => null_mask.set(idx + origin_count, true),
Value::Boolean(val) => values.bool_values.push(val),
Value::UInt8(val) => values.u8_values.push(val.into()),

View File

@@ -20,6 +20,7 @@ use static_assertions::{assert_fields, assert_impl_all};
struct Foo {}
#[test]
#[allow(clippy::extra_unused_type_parameters)]
fn test_derive() {
Foo::default();
assert_fields!(Foo: input_types);

View File

@@ -19,7 +19,7 @@ num-traits = "0.2"
once_cell = "1.10"
paste = "1.0"
snafu.workspace = true
statrs = "0.15"
statrs = "0.16"
[dev-dependencies]
ron = "0.7"

View File

@@ -14,7 +14,7 @@ datafusion-common.workspace = true
datafusion-expr.workspace = true
datatypes = { path = "../../datatypes" }
snafu.workspace = true
statrs = "0.15"
statrs = "0.16"
[dev-dependencies]
common-base = { path = "../base" }

View File

@@ -45,7 +45,7 @@ impl NamespaceImpl {
}
}
#[allow(clippy::derive_hash_xor_eq)]
#[allow(clippy::derived_hash_with_manual_eq)]
impl Hash for NamespaceImpl {
fn hash<H: Hasher>(&self, state: &mut H) {
self.id.hash(state);

View File

@@ -421,7 +421,7 @@ mod tests {
let vec = r.unwrap();
entries.extend(vec.into_iter().map(|e| e.id));
}
assert_eq!((0..cnt).into_iter().collect::<HashSet<_>>(), entries);
assert_eq!((0..cnt).collect::<HashSet<_>>(), entries);
}
async fn collect_entries(mut s: SendableEntryStream<'_, Entry, Error>) -> Vec<Entry> {

View File

@@ -30,18 +30,13 @@ pub trait Selector: Send + Sync {
async fn select(&self, ns: Namespace, ctx: &Self::Context) -> Result<Self::Output>;
}
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, Default)]
pub enum SelectorType {
LoadBased,
#[default]
LeaseBased,
}
impl Default for SelectorType {
fn default() -> Self {
SelectorType::LeaseBased
}
}
impl TryFrom<&str> for SelectorType {
type Error = error::Error;

View File

@@ -83,10 +83,10 @@ impl CachePolicy for LruCachePolicy {
}
Ok(v)
}
Err(_) => return inner.read(&path, args).await,
Err(_) => inner.read(&path, args).await,
}
}
Err(_) => return inner.read(&path, args).await,
Err(_) => inner.read(&path, args).await,
}
})
}
@@ -117,7 +117,7 @@ impl CachePolicy for LruCachePolicy {
for file in cache_files {
let _ = cache.delete(&file, OpDelete::new()).await;
}
return inner.delete(&path, args).await;
inner.delete(&path, args).await
})
}
}

View File

@@ -46,7 +46,7 @@ num = "0.4"
num-traits = "0.2"
paste = "1.0"
rand = "0.8"
statrs = "0.15"
statrs = "0.16"
stats-cli = "3.0"
streaming-stats = "0.2"
tokio-stream = "0.1"

View File

@@ -509,7 +509,6 @@ pub(crate) fn init_interpreter() -> Arc<Interpreter> {
// not using full stdlib to prevent security issue, instead filter out a few simple util module
vm.add_native_modules(
rustpython_stdlib::get_module_inits()
.into_iter()
.filter(|(k, _)| native_module_allow_list.contains(k.as_ref())),
);

View File

@@ -111,7 +111,6 @@ impl LineWriter {
let rows = self.current_rows;
let mut builder = datatype.create_mutable_vector(self.expected_rows);
(0..rows)
.into_iter()
.try_for_each(|_| builder.push_value_ref(ValueRef::Null))
.context(VectorConversionSnafu)
.unwrap();
@@ -130,7 +129,6 @@ impl LineWriter {
self.current_rows += 1;
self.columns_builders
.values_mut()
.into_iter()
.try_for_each(|(builder, len)| {
if self.current_rows > *len {
builder.push_value_ref(ValueRef::Null)

View File

@@ -301,7 +301,6 @@ mod tests {
// file with an large time range
let expected = (0..(TIME_BUCKETS[4] / TIME_BUCKETS[0]))
.into_iter()
.map(|b| (b * TIME_BUCKETS[0], &["a"] as _))
.collect::<Vec<_>>();
check_bucket_calculation(

View File

@@ -147,7 +147,6 @@ impl LevelMeta {
fn new_level_meta_vec() -> LevelMetaVec {
(0u8..MAX_LEVEL)
.into_iter()
.map(LevelMeta::new)
.collect::<Vec<_>>()
.try_into()