Skip to content

Commit 5379c99

Browse files
authored
update edition to 2024 (#2620)
* update common to edition 2024 * update bitpacker to edition 2024 * update stacker to edition 2024 * update query-grammar to edition 2024 * update sstable to edition 2024 + fmt * fmt * update columnar to edition 2024 * cargo fmt * use None instead of _
1 parent 3fa90e7 commit 5379c99

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+238
-230
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repository = "https://github.com/quickwit-oss/tantivy"
1111
readme = "README.md"
1212
keywords = ["search", "information", "retrieval"]
1313
edition = "2021"
14-
rust-version = "1.75"
14+
rust-version = "1.85"
1515
exclude = ["benches/*.json", "benches/*.txt"]
1616

1717
[dependencies]

bitpacker/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tantivy-bitpacker"
33
version = "0.6.0"
4-
edition = "2021"
4+
edition = "2024"
55
authors = ["Paul Masurel <[email protected]>"]
66
license = "MIT"
77
categories = []

bitpacker/src/blocked_bitpacker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use super::bitpacker::BitPacker;
22
use super::compute_num_bits;
3-
use crate::{minmax, BitUnpacker};
3+
use crate::{BitUnpacker, minmax};
44

55
const BLOCK_SIZE: usize = 128;
66

bitpacker/src/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,7 @@ pub use crate::blocked_bitpacker::BlockedBitpacker;
3333
/// number of bits.
3434
pub fn compute_num_bits(n: u64) -> u8 {
3535
let amplitude = (64u32 - n.leading_zeros()) as u8;
36-
if amplitude <= 64 - 8 {
37-
amplitude
38-
} else {
39-
64
40-
}
36+
if amplitude <= 64 - 8 { amplitude } else { 64 }
4137
}
4238

4339
/// Computes the (min, max) of an iterator of `PartialOrd` values.

columnar/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "tantivy-columnar"
33
version = "0.3.0"
4-
edition = "2021"
4+
edition = "2024"
55
license = "MIT"
66
homepage = "https://github.com/quickwit-oss/tantivy"
77
repository = "https://github.com/quickwit-oss/tantivy"

columnar/benches/bench_access.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use binggan::{black_box, InputGroup};
1+
use binggan::{InputGroup, black_box};
22
use common::*;
33
use tantivy_columnar::Column;
44

columnar/benches/bench_first_vals.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ extern crate test;
44
use std::sync::Arc;
55

66
use rand::prelude::*;
7-
use tantivy_columnar::column_values::{serialize_and_load_u64_based_column_values, CodecType};
7+
use tantivy_columnar::column_values::{CodecType, serialize_and_load_u64_based_column_values};
88
use tantivy_columnar::*;
9-
use test::{black_box, Bencher};
9+
use test::{Bencher, black_box};
1010

1111
struct Columns {
1212
pub optional: Column,

columnar/benches/bench_merge.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub mod common;
22

33
use binggan::BenchRunner;
4-
use common::{generate_columnar_with_name, Card};
4+
use common::{Card, generate_columnar_with_name};
55
use tantivy_columnar::*;
66

77
const NUM_DOCS: u32 = 100_000;

columnar/benches/bench_values_u128.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::sync::Arc;
66
use common::OwnedBytes;
77
use rand::rngs::StdRng;
88
use rand::seq::SliceRandom;
9-
use rand::{random, Rng, SeedableRng};
9+
use rand::{Rng, SeedableRng, random};
1010
use tantivy_columnar::ColumnValues;
1111
use test::Bencher;
1212
extern crate test;

columnar/benches/bench_values_u64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::ops::RangeInclusive;
55
use std::sync::Arc;
66

77
use rand::prelude::*;
8-
use tantivy_columnar::column_values::{serialize_and_load_u64_based_column_values, CodecType};
8+
use tantivy_columnar::column_values::{CodecType, serialize_and_load_u64_based_column_values};
99
use tantivy_columnar::*;
1010
use test::Bencher;
1111

0 commit comments

Comments
 (0)