Skip to content

Commit db24792

Browse files
authored
bump rust-version to 1.85.0 + use Rust edition 2024 + apply new formatting (#106)
* chore: bump rust-version to 1.85.0 * chore(deps): update hashbrown to v0.17.0 * chore: update edition to 2024 * chore: run code formatter
1 parent 6897b32 commit db24792

12 files changed

Lines changed: 29 additions & 25 deletions

File tree

.rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
imports_granularity = "Crate"
22
imports_layout = "HorizontalVertical"
3-
edition = "2021"
3+
edition = "2024"

Cargo.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@ description = """Efficient string interner with minimal memory footprint
1111
and fast access to the underlying strings.
1212
"""
1313
categories = ["data-structures"]
14-
edition = "2021"
15-
rust-version = "1.65.0"
14+
edition = "2024"
15+
rust-version = "1.85.0"
1616

1717
[dependencies]
18-
hashbrown = { version = "0.16.0", default-features = false, features = ["default-hasher", "raw-entry"] }
18+
hashbrown = { version = "0.17.0", default-features = false, features = ["default-hasher", "raw-entry"] }
1919
serde = { version = "1.0", default-features = false, features = ["alloc"], optional = true }
2020

2121
[dev-dependencies]

benches/bench.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,22 @@
11
mod setup;
22

33
use self::setup::{
4-
generate_test_strings,
4+
BENCH_LEN_STRINGS,
5+
BENCH_STRING_LEN,
56
BackendBenchmark,
67
BenchBucket,
78
BenchBuffer,
89
BenchString,
9-
BENCH_LEN_STRINGS,
10-
BENCH_STRING_LEN,
10+
generate_test_strings,
1111
};
1212
use criterion::{
13-
criterion_group,
14-
criterion_main,
15-
measurement::WallTime,
1613
BatchSize,
1714
BenchmarkGroup,
1815
Criterion,
1916
Throughput,
17+
criterion_group,
18+
criterion_main,
19+
measurement::WallTime,
2020
};
2121
use std::hint::black_box;
2222
use string_interner::backend::Backend;

benches/setup.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use string_interner::{
2-
backend::{Backend, BucketBackend, BufferBackend, StringBackend},
32
DefaultSymbol,
43
StringInterner,
4+
backend::{Backend, BucketBackend, BufferBackend, StringBackend},
55
};
66

77
/// Alphabet containing all characters that may be put into a benchmark string.

src/backend/bucket/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ mod interned_str;
55

66
use self::{fixed_str::FixedString, interned_str::InternedStr};
77
use super::Backend;
8-
use crate::{symbol::expect_valid_symbol, DefaultSymbol, Symbol};
8+
use crate::{DefaultSymbol, Symbol, symbol::expect_valid_symbol};
99
use alloc::{string::String, vec::Vec};
1010
use core::{iter::Enumerate, marker::PhantomData, slice};
1111

src/backend/buffer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![cfg(feature = "backends")]
22

33
use super::Backend;
4-
use crate::{symbol::expect_valid_symbol, DefaultSymbol, Symbol};
4+
use crate::{DefaultSymbol, Symbol, symbol::expect_valid_symbol};
55
use alloc::vec::Vec;
66
use core::{marker::PhantomData, mem, str};
77

src/backend/string.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![cfg(feature = "backends")]
22

33
use super::Backend;
4-
use crate::{symbol::expect_valid_symbol, DefaultSymbol, Symbol};
4+
use crate::{DefaultSymbol, Symbol, symbol::expect_valid_symbol};
55
use alloc::{string::String, vec::Vec};
66
use core::{iter::Enumerate, marker::PhantomData, slice};
77

src/interner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{backend::Backend, Symbol};
1+
use crate::{Symbol, backend::Backend};
22
use core::{
33
fmt,
44
fmt::{Debug, Formatter},

src/serde_impl.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::{backend::Backend, StringInterner, Symbol};
1+
use crate::{StringInterner, Symbol, backend::Backend};
22
use alloc::boxed::Box;
33
use core::{default::Default, fmt, hash::BuildHasher, marker};
44
use serde::{
@@ -123,8 +123,8 @@ impl_serde_for_symbol!(SymbolUsize, usize);
123123
#[cfg(test)]
124124
mod tests {
125125
use crate::{
126-
symbol::{SymbolU16, SymbolU32, SymbolUsize},
127126
Symbol,
127+
symbol::{SymbolU16, SymbolU32, SymbolUsize},
128128
};
129129
use serde_json;
130130

0 commit comments

Comments
 (0)