Skip to content

Commit 8eced68

Browse files
authored
chore(rust): update rustc to 2023-01-19 (#6341)
1 parent fde2682 commit 8eced68

File tree

28 files changed

+64
-134
lines changed

28 files changed

+64
-134
lines changed

.github/deploy_manylinux.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ls -la
88
rm py-polars/README.md
99
cp README.md py-polars/README.md
1010
cd py-polars
11-
rustup override set nightly-2022-12-20
11+
rustup override set nightly-2023-01-19
1212
export RUSTFLAGS='-C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma'
1313

1414
# first the default release

.github/workflows/benchmark.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
- name: Set up Rust
5252
uses: dtolnay/rust-toolchain@master
5353
with:
54-
toolchain: nightly-2022-12-20
54+
toolchain: nightly-2023-01-19
5555

5656
- name: Cache Rust
5757
uses: Swatinem/rust-cache@v2

.github/workflows/build-test-rust.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
- name: Set up Rust
3535
uses: dtolnay/rust-toolchain@master
3636
with:
37-
toolchain: nightly-2022-12-20
37+
toolchain: nightly-2023-01-19
3838

3939
- name: Cache Rust
4040
uses: Swatinem/rust-cache@v2
@@ -58,7 +58,7 @@ jobs:
5858
- name: Set up Rust
5959
uses: dtolnay/rust-toolchain@master
6060
with:
61-
toolchain: nightly-2022-12-20
61+
toolchain: nightly-2023-01-19
6262
components: rustfmt, clippy, miri
6363

6464
- name: Cache Rust
@@ -102,7 +102,7 @@ jobs:
102102
- name: Set up Rust
103103
uses: dtolnay/rust-toolchain@master
104104
with:
105-
toolchain: nightly-2022-12-20
105+
toolchain: nightly-2023-01-19
106106

107107
- name: Cache Rust
108108
uses: Swatinem/rust-cache@v2

.github/workflows/create-python-release.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
3030
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
3131
with:
32-
rust-toolchain: nightly-2022-12-20
32+
rust-toolchain: nightly-2023-01-19
3333
maturin-version: '0.14.10'
3434
command: publish
3535
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
@@ -54,7 +54,7 @@ jobs:
5454
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
5555
JEMALLOC_SYS_WITH_LG_PAGE: 16
5656
with:
57-
rust-toolchain: nightly-2022-12-20
57+
rust-toolchain: nightly-2023-01-19
5858
target: aarch64-unknown-linux-gnu
5959
maturin-version: '0.14.10'
6060
command: publish
@@ -85,7 +85,7 @@ jobs:
8585
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
8686
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt,+avx,+fma
8787
with:
88-
rust-toolchain: nightly-2022-12-20
88+
rust-toolchain: nightly-2023-01-19
8989
maturin-version: '0.14.10'
9090
command: publish
9191
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
@@ -112,7 +112,7 @@ jobs:
112112
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
113113
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt --cfg use_mimalloc
114114
with:
115-
rust-toolchain: nightly-2022-12-20
115+
rust-toolchain: nightly-2023-01-19
116116
maturin-version: '0.14.10'
117117
command: publish
118118
args: -m py-polars/Cargo.toml --skip-existing -o wheels -u ritchie46
@@ -141,7 +141,7 @@ jobs:
141141
MATURIN_PASSWORD: ${{ secrets.PYPI_PASS }}
142142
RUSTFLAGS: -C target-feature=+fxsr,+sse,+sse2,+sse3,+sse4.1,+sse4.2
143143
with:
144-
rust-toolchain: nightly-2022-12-20
144+
rust-toolchain: nightly-2023-01-19
145145
maturin-version: '0.14.10'
146146
command: publish
147147
args: -m py-polars/Cargo.toml --no-sdist --skip-existing -o wheels -i python -u ritchie46
@@ -162,7 +162,7 @@ jobs:
162162
- name: Set up Rust
163163
uses: dtolnay/rust-toolchain@master
164164
with:
165-
toolchain: nightly-2022-12-20
165+
toolchain: nightly-2023-01-19
166166

167167
- name: Set up Rust targets
168168
run: rustup target add aarch64-apple-darwin
@@ -194,7 +194,7 @@ jobs:
194194
# - name: Set up Rust
195195
# uses: dtolnay/rust-toolchain@master
196196
# with:
197-
# toolchain: nightly-2022-12-20
197+
# toolchain: nightly-2023-01-19
198198

199199
# - name: Set up Rust targets
200200
# run: rustup target add aarch64-apple-darwin

.github/workflows/docs-deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
- name: Set up Rust
3131
uses: dtolnay/rust-toolchain@master
3232
with:
33-
toolchain: nightly-2022-12-20
33+
toolchain: nightly-2023-01-19
3434
components: rust-docs
3535

3636
- name: Cache Rust

.github/workflows/lint-python.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Rust
3838
uses: dtolnay/rust-toolchain@master
3939
with:
40-
toolchain: nightly-2022-12-20
40+
toolchain: nightly-2023-01-19
4141
components: rustfmt, clippy
4242
- name: Cache Rust
4343
uses: Swatinem/rust-cache@v2

.github/workflows/test-python.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ jobs:
5050
- name: Set up Rust
5151
uses: dtolnay/rust-toolchain@master
5252
with:
53-
toolchain: nightly-2022-12-20
53+
toolchain: nightly-2023-01-19
5454

5555
- name: Cache Rust
5656
uses: Swatinem/rust-cache@v2
@@ -113,7 +113,7 @@ jobs:
113113
- name: Set up Rust
114114
uses: dtolnay/rust-toolchain@master
115115
with:
116-
toolchain: nightly-2022-12-20
116+
toolchain: nightly-2023-01-19
117117

118118
- name: Cache Rust
119119
uses: Swatinem/rust-cache@v2

polars/polars-arrow/src/kernels/rolling/no_nulls/mod.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,22 +63,17 @@ where
6363
))
6464
}
6565

66-
#[derive(Clone, Copy, PartialEq, Eq, Debug)]
66+
#[derive(Clone, Copy, PartialEq, Eq, Debug, Default)]
6767
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6868
pub enum QuantileInterpolOptions {
69+
#[default]
6970
Nearest,
7071
Lower,
7172
Higher,
7273
Midpoint,
7374
Linear,
7475
}
7576

76-
impl Default for QuantileInterpolOptions {
77-
fn default() -> Self {
78-
QuantileInterpolOptions::Nearest
79-
}
80-
}
81-
8277
pub(super) fn rolling_apply_weights<T, Fo, Fa>(
8378
values: &[T],
8479
window_size: usize,

polars/polars-arrow/src/kernels/set.rs

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,13 @@ where
2525
let validity = BooleanArray::from_data_default(validity.clone(), None);
2626

2727
let mut av = Vec::with_capacity(array.len());
28-
BinaryMaskedSliceIterator::new(&validity)
29-
.into_iter()
30-
.for_each(|(lower, upper, truthy)| {
31-
if truthy {
32-
av.extend_from_slice(&values[lower..upper])
33-
} else {
34-
av.extend_trusted_len(std::iter::repeat(value).take(upper - lower))
35-
}
36-
});
28+
BinaryMaskedSliceIterator::new(&validity).for_each(|(lower, upper, truthy)| {
29+
if truthy {
30+
av.extend_from_slice(&values[lower..upper])
31+
} else {
32+
av.extend_trusted_len(std::iter::repeat(value).take(upper - lower))
33+
}
34+
});
3735

3836
PrimitiveArray::new(array.data_type().clone(), av.into(), None)
3937
}
@@ -48,15 +46,13 @@ pub fn set_with_mask<T: NativeType>(
4846
let values = array.values();
4947

5048
let mut buf = Vec::with_capacity(array.len());
51-
BinaryMaskedSliceIterator::new(mask)
52-
.into_iter()
53-
.for_each(|(lower, upper, truthy)| {
54-
if truthy {
55-
buf.extend_trusted_len(std::iter::repeat(value).take(upper - lower))
56-
} else {
57-
buf.extend_from_slice(&values[lower..upper])
58-
}
59-
});
49+
BinaryMaskedSliceIterator::new(mask).for_each(|(lower, upper, truthy)| {
50+
if truthy {
51+
buf.extend_trusted_len(std::iter::repeat(value).take(upper - lower))
52+
} else {
53+
buf.extend_from_slice(&values[lower..upper])
54+
}
55+
});
6056
// make sure that where the mask is set to true, the validity buffer is also set to valid
6157
// after we have applied the or operation we have new buffer with no offsets
6258
let validity = array.validity().as_ref().map(|valid| {

polars/polars-core/src/chunked_array/ops/apply.rs

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ where
171171
{
172172
let chunks = self
173173
.data_views()
174-
.into_iter()
175174
.zip(self.iter_validities())
176175
.map(|(slice, validity)| {
177176
let values = slice.iter().copied().map(f);
@@ -188,7 +187,6 @@ where
188187
{
189188
let mut ca: ChunkedArray<T> = self
190189
.data_views()
191-
.into_iter()
192190
.zip(self.iter_validities())
193191
.map(|(slice, validity)| {
194192
let vec: PolarsResult<Vec<_>> = slice.iter().copied().map(f).collect();
@@ -361,7 +359,6 @@ impl<'a> ChunkApply<'a, &'a str, Cow<'a, str>> for Utf8Chunked {
361359
{
362360
let chunks = self
363361
.downcast_iter()
364-
.into_iter()
365362
.map(|array| {
366363
let values = array.values_iter().map(f);
367364
let values = Vec::<_>::from_trusted_len_iter(values);
@@ -378,7 +375,6 @@ impl<'a> ChunkApply<'a, &'a str, Cow<'a, str>> for Utf8Chunked {
378375
{
379376
let chunks = self
380377
.downcast_iter()
381-
.into_iter()
382378
.map(|array| {
383379
let values = array.into_iter().map(f);
384380
let values = Vec::<_>::from_trusted_len_iter(values);
@@ -455,7 +451,6 @@ impl<'a> ChunkApply<'a, &'a [u8], Cow<'a, [u8]>> for BinaryChunked {
455451
{
456452
let chunks = self
457453
.downcast_iter()
458-
.into_iter()
459454
.map(|array| {
460455
let values = array.values_iter().map(f);
461456
let values = Vec::<_>::from_trusted_len_iter(values);
@@ -472,7 +467,6 @@ impl<'a> ChunkApply<'a, &'a [u8], Cow<'a, [u8]>> for BinaryChunked {
472467
{
473468
let chunks = self
474469
.downcast_iter()
475-
.into_iter()
476470
.map(|array| {
477471
let values = array.into_iter().map(f);
478472
let values = Vec::<_>::from_trusted_len_iter(values);
@@ -542,15 +536,15 @@ impl<'a> ChunkApply<'a, &'a [u8], Cow<'a, [u8]>> for BinaryChunked {
542536

543537
impl ChunkApplyKernel<BooleanArray> for BooleanChunked {
544538
fn apply_kernel(&self, f: &dyn Fn(&BooleanArray) -> ArrayRef) -> Self {
545-
let chunks = self.downcast_iter().into_iter().map(f).collect();
539+
let chunks = self.downcast_iter().map(f).collect();
546540
unsafe { Self::from_chunks(self.name(), chunks) }
547541
}
548542

549543
fn apply_kernel_cast<S>(&self, f: &dyn Fn(&BooleanArray) -> ArrayRef) -> ChunkedArray<S>
550544
where
551545
S: PolarsDataType,
552546
{
553-
let chunks = self.downcast_iter().into_iter().map(f).collect();
547+
let chunks = self.downcast_iter().map(f).collect();
554548
unsafe { ChunkedArray::<S>::from_chunks(self.name(), chunks) }
555549
}
556550
}
@@ -569,7 +563,7 @@ where
569563
where
570564
S: PolarsDataType,
571565
{
572-
let chunks = self.downcast_iter().into_iter().map(f).collect();
566+
let chunks = self.downcast_iter().map(f).collect();
573567
unsafe { ChunkedArray::from_chunks(self.name(), chunks) }
574568
}
575569
}
@@ -583,7 +577,7 @@ impl ChunkApplyKernel<LargeStringArray> for Utf8Chunked {
583577
where
584578
S: PolarsDataType,
585579
{
586-
let chunks = self.downcast_iter().into_iter().map(f).collect();
580+
let chunks = self.downcast_iter().map(f).collect();
587581
unsafe { ChunkedArray::from_chunks(self.name(), chunks) }
588582
}
589583
}
@@ -598,7 +592,7 @@ impl ChunkApplyKernel<LargeBinaryArray> for BinaryChunked {
598592
where
599593
S: PolarsDataType,
600594
{
601-
let chunks = self.downcast_iter().into_iter().map(f).collect();
595+
let chunks = self.downcast_iter().map(f).collect();
602596
unsafe { ChunkedArray::from_chunks(self.name(), chunks) }
603597
}
604598
}
@@ -612,7 +606,6 @@ impl<'a> ChunkApply<'a, Series, Series> for ListChunked {
612606
let dtype = self.inner_dtype();
613607
let chunks = self
614608
.downcast_iter()
615-
.into_iter()
616609
.map(|array| {
617610
unsafe {
618611
let values = array
@@ -642,7 +635,6 @@ impl<'a> ChunkApply<'a, Series, Series> for ListChunked {
642635
let dtype = self.inner_dtype();
643636
let chunks = self
644637
.downcast_iter()
645-
.into_iter()
646638
.map(|array| {
647639
let values = array.iter().map(|x| {
648640
let x = x.map(|x| {

0 commit comments

Comments
 (0)