Skip to content

Commit 6ef8a5b

Browse files
authored
chore: update to 2024 edition (#72)
1 parent bd317e2 commit 6ef8a5b

File tree

11 files changed

+118
-163
lines changed

11 files changed

+118
-163
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
members = [".", "arithmetic-coding-core", "fenwick-model"]
33

44
[workspace.package]
5-
rust-version = "1.83.0"
6-
edition = "2021"
5+
rust-version = "1.85.0"
6+
edition = "2024"
77
license = "MIT"
88
keywords = ["compression", "encoding", "arithmetic-coding", "lossless"]
99
categories = ["compression", "encoding", "parsing"]

arithmetic-coding-core/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ mod bitstore;
66
pub use bitstore::BitStore;
77

88
mod model;
9-
pub use model::{fixed_length, max_length, one_shot, Model};
9+
pub use model::{Model, fixed_length, max_length, one_shot};

arithmetic-coding-core/src/model/one_shot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use std::ops::Range;
44

55
pub use crate::fixed_length::Wrapper;
6-
use crate::{fixed_length, BitStore};
6+
use crate::{BitStore, fixed_length};
77

88
/// A [`Model`] is used to calculate the probability of a given symbol occurring
99
/// in a sequence.

benches/sherlock.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use std::{fs::File, hint::black_box, io::Read, ops::Range};
22

33
use arithmetic_coding::Model;
4-
use criterion::{criterion_group, criterion_main, Criterion};
5-
use fenwick_model::{simple::FenwickModel, ValueError};
4+
use criterion::{Criterion, criterion_group, criterion_main};
5+
use fenwick_model::{ValueError, simple::FenwickModel};
66

77
mod common;
88

examples/fenwick_adaptive.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use arithmetic_coding::Model;
44

55
mod common;
66

7-
use fenwick_model::{simple::FenwickModel, ValueError};
7+
use fenwick_model::{ValueError, simple::FenwickModel};
88

99
const ALPHABET: &str =
1010
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,\n-':()[]#*;\"!?*&é/àâè%@$";

examples/fenwick_context_switching.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ use arithmetic_coding::Model;
44

55
mod common;
66

7-
use fenwick_model::{context_switching::FenwickModel, ValueError};
7+
use fenwick_model::{ValueError, context_switching::FenwickModel};
88

99
const ALPHABET: &str =
1010
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 .,\n-':()[]#*;\"!?*&é/àâè%@$";

src/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use std::{io, ops::Range};
55
use bitstream_io::BitRead;
66

77
use crate::{
8-
common::{self, assert_precision_sufficient},
98
BitStore, Model,
9+
common::{self, assert_precision_sufficient},
1010
};
1111

1212
// this algorithm is derived from this article - https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html

src/encoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ use std::{io, ops::Range};
55
use bitstream_io::BitWrite;
66

77
use crate::{
8-
common::{self, assert_precision_sufficient},
98
BitStore, Error, Model,
9+
common::{self, assert_precision_sufficient},
1010
};
1111

1212
// this algorithm is derived from this article - https://marknelson.us/posts/2014/10/19/data-compression-with-arithmetic-coding.html

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
missing_copy_implementations
77
)]
88

9-
pub use arithmetic_coding_core::{fixed_length, max_length, one_shot, BitStore, Model};
9+
pub use arithmetic_coding_core::{BitStore, Model, fixed_length, max_length, one_shot};
1010

1111
mod common;
1212
pub mod decoder;

0 commit comments

Comments
 (0)