Skip to content

Commit cad002d

Browse files
authored
Merge pull request #83 from sile/2024-edition
Upgrade Rust edition to 2024
2 parents 0d956b9 + a1c98c0 commit cad002d

File tree

11 files changed

+18
-19
lines changed

11 files changed

+18
-19
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
features: [--no-default-features, --all-features]
1313
steps:
1414
- name: Checkout sources
15-
uses: actions/checkout@v5
15+
uses: actions/checkout@v6
1616

1717
- name: Install ${{ matrix.toolchain }} toolchain
1818
run: |
@@ -27,7 +27,7 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout sources
30-
uses: actions/checkout@v5
30+
uses: actions/checkout@v6
3131

3232
- name: Install nightly toolchain
3333
run: |
@@ -54,7 +54,7 @@ jobs:
5454
features: [--no-default-features, --all-features]
5555
steps:
5656
- name: Checkout sources
57-
uses: actions/checkout@v5
57+
uses: actions/checkout@v6
5858

5959
- name: Install ${{ matrix.toolchain }} toolchain
6060
run: |
@@ -73,7 +73,7 @@ jobs:
7373
features: [--no-default-features, --all-features]
7474
steps:
7575
- name: Checkout sources
76-
uses: actions/checkout@v5
76+
uses: actions/checkout@v6
7777

7878
- name: Install ${{ matrix.toolchain }} toolchain
7979
run: |

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
permissions:
1111
contents: write
1212
steps:
13-
- uses: actions/checkout@v5
13+
- uses: actions/checkout@v6
1414
- id: create-release
1515
run: gh release create ${{ github.ref_name }} --title "${{ github.ref_name }}" --generate-notes
1616
env:
@@ -23,7 +23,7 @@ jobs:
2323
permissions:
2424
id-token: write
2525
steps:
26-
- uses: actions/checkout@v5
26+
- uses: actions/checkout@v6
2727
- uses: rust-lang/crates-io-auth-action@v1
2828
id: auth
2929
- run: cargo publish

Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ readme = "README.md"
99
keywords = ["deflate", "gzip", "zlib"]
1010
categories = ["compression", "no-std"]
1111
license = "MIT"
12-
edition = "2021"
12+
edition = "2024"
1313
include = [
1414
"Cargo.toml",
1515
"README.md",
@@ -37,4 +37,3 @@ exclude = ["flate_bench"]
3737

3838
[lints.rust]
3939
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(fuzzing)'] }
40-

flate_bench/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "flate_bench"
33
version = "0.1.0"
44
authors = ["Takeru Ohta <phjgt308@gmail.com>"]
5-
edition = "2021"
5+
edition = "2024"
66

77
[dependencies]
88
clap = { version = "4", features = ["derive"] }

libflate_lz77/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "libflate_lz77"
33
version = "2.2.0"
44
authors = ["Takeru Ohta <phjgt308@gmail.com>"]
5-
edition = "2021"
5+
edition = "2024"
66
description = "LZ77 encoder for libflate crate"
77
homepage = "https://github.com/sile/libflate"
88
repository = "https://github.com/sile/libflate"

src/deflate/encode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
use super::symbol;
21
use super::BlockType;
2+
use super::symbol;
33
use crate::bit;
44
use crate::finish::{Complete, Finish};
55
use crate::lz77;

src/deflate/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
//! assert_eq!(decoded_data, b"Hello World!");
2121
//! ```
2222
pub use self::decode::Decoder;
23+
pub use self::encode::DEFAULT_BLOCK_SIZE;
2324
pub use self::encode::EncodeOptions;
2425
pub use self::encode::Encoder;
25-
pub use self::encode::DEFAULT_BLOCK_SIZE;
2626

2727
mod decode;
2828
mod encode;

src/finish.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,10 @@ impl<T: Complete> AutoFinish<T> {
125125
}
126126
impl<T: Complete> Drop for AutoFinish<T> {
127127
fn drop(&mut self) {
128-
if let Some(inner) = self.inner.take() {
129-
if let Err(e) = inner.complete() {
130-
panic!("{}", e);
131-
}
128+
if let Some(inner) = self.inner.take()
129+
&& let Err(e) = inner.complete()
130+
{
131+
panic!("{}", e);
132132
}
133133
}
134134
}

src/non_blocking/deflate/decode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ impl Read for BlockDecoder {
240240
mod tests {
241241
use super::*;
242242
use crate::deflate::{EncodeOptions, Encoder};
243-
use crate::util::{nb_read_to_end, WouldBlockReader};
243+
use crate::util::{WouldBlockReader, nb_read_to_end};
244244
use alloc::{format, string::String, vec::Vec};
245245
use core2::io::{Read, Write};
246246

src/non_blocking/gzip.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<R: Read> Read for Decoder<R> {
156156
mod tests {
157157
use super::*;
158158
use crate::gzip::Encoder;
159-
use crate::util::{nb_read_to_end, WouldBlockReader};
159+
use crate::util::{WouldBlockReader, nb_read_to_end};
160160
use alloc::vec::Vec;
161161
use core2::io::Write;
162162

0 commit comments

Comments
 (0)