Skip to content

Commit 63931f0

Browse files
authored
Chore: Update lints for 1.91 but don't actually change versions (#5706)
This is resurrected from #5553, but without any actual version changes. Might as well make these changes since we will eventually need to make them. Signed-off-by: Connor Tsui <[email protected]>
1 parent e16faa6 commit 63931f0

File tree

19 files changed

+31
-35
lines changed

19 files changed

+31
-35
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -662,13 +662,10 @@ jobs:
662662
- uses: ./.github/actions/setup-rust
663663
with:
664664
repo-token: ${{ secrets.GITHUB_TOKEN }}
665-
toolchain: nightly-2025-06-26
666665
targets: "wasm32-wasip1"
667-
components: "rust-src"
668666
- name: Setup Wasmer
669667
uses: wasmerio/[email protected]
670-
# there is a compiler bug in nightly (but not in nightly-2025-06-26)
671-
- run: cargo +nightly-2025-06-26 -Zbuild-std=panic_abort,std build --target wasm32-wasip1
668+
- run: cargo build --target wasm32-wasip1
672669
working-directory: ./wasm-test
673670
- run: wasmer run ./target/wasm32-wasip1/debug/wasm-test.wasm
674671
working-directory: ./wasm-test

bench-vortex/src/bin/compress.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn compress(
109109
.map(|f| Target::new(Engine::default(), *f))
110110
.collect_vec();
111111

112-
let structlistofints = vec![
112+
let structlistofints = [
113113
StructListOfInts::new(100, 1000, 1),
114114
StructListOfInts::new(1000, 1000, 1),
115115
StructListOfInts::new(10000, 1000, 1),

bench-vortex/src/compress/bench.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ use {
2424
crate::bench_run::run_with_setup,
2525
crate::utils::parquet::convert_utf8view_batch,
2626
crate::utils::parquet::convert_utf8view_schema,
27+
anyhow::Context,
2728
arrow_array::RecordBatch,
2829
parking_lot::Mutex,
2930
std::fs,
@@ -131,9 +132,7 @@ pub fn benchmark_vortex_decompress(
131132
bench_name: &str,
132133
) -> Result<(Duration, CompressionTimingMeasurement)> {
133134
let mut buf = Vec::new();
134-
runtime
135-
.block_on(vortex_compress_write(uncompressed, &mut buf))
136-
.expect("Failed to compress with vortex for decompression test");
135+
runtime.block_on(vortex_compress_write(uncompressed, &mut buf))?;
137136
let buffer = Bytes::from(buf);
138137

139138
// Run the benchmark and measure time.
@@ -255,7 +254,7 @@ pub fn benchmark_lance_compress(
255254
.collect::<Result<Vec<_>, _>>()?;
256255
let converted_schema = convert_utf8view_schema(&schema);
257256

258-
let temp_dir = tempfile::tempdir().expect("Failed to create temp dir");
257+
let temp_dir = tempfile::tempdir().context("Failed to create temp dir")?;
259258
let iteration_paths: Arc<Mutex<Vec<PathBuf>>> = Arc::new(Mutex::new(Vec::new()));
260259
let iteration_counter = AtomicU64::new(0);
261260

@@ -289,7 +288,7 @@ pub fn benchmark_lance_compress(
289288
// Calculate size from the last iteration.
290289
let paths = iteration_paths.lock();
291290
let lance_compressed_size_val = if let Some(last_path) = paths.last() {
292-
calculate_lance_size(last_path).expect("Failed to calculate Lance size")
291+
calculate_lance_size(last_path).context("Failed to calculate Lance size")?
293292
} else {
294293
0
295294
};
@@ -320,7 +319,7 @@ pub fn benchmark_lance_decompress(
320319
// NOTE: Lance requires filesystem access unlike Parquet/Vortex which use in-memory buffers.
321320
let chunked = uncompressed.as_::<ChunkedVTable>().clone();
322321
let (batches, schema) = chunked_to_vec_record_batch(chunked);
323-
let temp_dir = tempfile::tempdir().expect("Failed to create temp dir");
322+
let temp_dir = tempfile::tempdir().context("Failed to create temp dir")?;
324323

325324
// Write the Lance dataset once for all iterations.
326325
let dataset_path = runtime.block_on(async {

bench-vortex/src/engines/df/mod.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ pub fn make_object_store(
100100
let s3 = Arc::new(
101101
AmazonS3Builder::from_env()
102102
.with_bucket_name(bucket_name)
103-
.build()
104-
.unwrap(),
103+
.build()?,
105104
);
106105
df.register_object_store(&Url::parse(&format!("s3://{bucket_name}/"))?, s3.clone());
107106
Ok(s3)
@@ -111,8 +110,7 @@ pub fn make_object_store(
111110
let gcs = Arc::new(
112111
GoogleCloudStorageBuilder::from_env()
113112
.with_bucket_name(bucket_name)
114-
.build()
115-
.unwrap(),
113+
.build()?,
116114
);
117115
df.register_object_store(&Url::parse(&format!("gs://{bucket_name}/"))?, gcs.clone());
118116
Ok(gcs)

encodings/fastlanes/benches/bitpacking_take.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ fn patched_take_10k_adversarial(bencher: Bencher) {
237237
(0..(NUM_EXCEPTIONS + 1024) / 1024)
238238
.cycle()
239239
.map(|chunk_idx| BIG_BASE2 - 1024 + chunk_idx * 1024)
240-
.flat_map(|base_idx| (base_idx..(base_idx + per_chunk_count)))
240+
.flat_map(|base_idx| base_idx..(base_idx + per_chunk_count))
241241
.take(10000),
242242
);
243243

encodings/fastlanes/src/delta/array/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ impl DeltaArray {
122122

123123
let lanes = lane_count(ptype);
124124

125-
if (deltas.len() % 1024 == 0) != (bases.len() % lanes == 0) {
125+
if deltas.len().is_multiple_of(1024) != bases.len().is_multiple_of(lanes) {
126126
vortex_bail!(
127127
"deltas length ({}) is a multiple of 1024 iff bases length ({}) is a multiple of LANES ({})",
128128
deltas.len(),

vortex-array/benches/chunk_array_builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ fn make_opt_bool_chunks(len: usize, chunk_count: usize) -> ArrayRef {
116116
let mut rng = StdRng::seed_from_u64(0);
117117

118118
const SPAN_LEN: usize = 10;
119-
assert!(len % SPAN_LEN == 0);
119+
assert!(len.is_multiple_of(SPAN_LEN));
120120

121121
(0..chunk_count)
122122
.map(|_| {

vortex-array/benches/varbinview_zip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ fn alternating_mask(len: usize) -> Mask {
7878
}
7979

8080
fn block_mask(len: usize, block: usize) -> Mask {
81-
Mask::from_iter((0..len).map(|i| (i / block) % 2 == 0))
81+
Mask::from_iter((0..len).map(|i| (i / block).is_multiple_of(2)))
8282
}

vortex-array/src/builders/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub trait ArrayBuilder: Send {
192192
///
193193
/// # Safety
194194
///
195-
/// Given validity must have an equal length to [`self.len()`].
195+
/// Given validity must have an equal length to [`self.len()`](Self::len).
196196
unsafe fn set_validity_unchecked(&mut self, validity: Mask);
197197

198198
/// Constructs an Array from the builder components.

vortex-array/src/compute/conformance/filter.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ pub fn create_sparse_pattern(len: usize, true_ratio: f64) -> Vec<bool> {
5454
}
5555

5656
pub fn create_runs_pattern(len: usize, run_length: usize) -> Vec<bool> {
57-
(0..len).map(|i| (i / run_length) % 2 == 0).collect()
57+
(0..len)
58+
.map(|i| (i / run_length).is_multiple_of(2))
59+
.collect()
5860
}
5961

6062
/// Tests that filtering with an all-true mask returns all elements unchanged

0 commit comments

Comments
 (0)