Skip to content

Commit 86e7aab

Browse files
authored
Freshen (#19)
1 parent 49182b4 commit 86e7aab

File tree

5 files changed

+258
-45
lines changed

5 files changed

+258
-45
lines changed

.cargo/config.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ rustflags = [
1111
"-Wclippy::dbg_macro",
1212
"-Wclippy::debug_assert_with_mut_call",
1313
"-Wclippy::doc_markdown",
14-
"-Wclippy::empty_enum",
1514
"-Wclippy::enum_glob_use",
1615
"-Wclippy::exit",
1716
"-Wclippy::expl_impl_clone_on_copy",
@@ -39,12 +38,10 @@ rustflags = [
3938
"-Wclippy::map_err_ignore",
4039
"-Wclippy::map_flatten",
4140
"-Wclippy::map_unwrap_or",
42-
"-Wclippy::match_on_vec_items",
4341
"-Wclippy::match_same_arms",
4442
"-Wclippy::match_wild_err_arm",
4543
"-Wclippy::match_wildcard_for_single_variants",
4644
"-Wclippy::mem_forget",
47-
"-Wclippy::mismatched_target_os",
4845
"-Wclippy::missing_enforced_import_renames",
4946
"-Wclippy::mut_mut",
5047
"-Wclippy::mutex_integer",
@@ -63,7 +60,6 @@ rustflags = [
6360
"-Wclippy::string_add_assign",
6461
"-Wclippy::string_add",
6562
"-Wclippy::string_lit_as_bytes",
66-
"-Wclippy::string_to_string",
6763
"-Wclippy::todo",
6864
"-Wclippy::trait_duplication_in_bounds",
6965
"-Wclippy::unimplemented",

.github/workflows/rust-ci.yml

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ name: CI
1010
jobs:
1111
lint:
1212
name: Lint
13-
runs-on: ubuntu-latest
13+
runs-on: ubuntu-24.04
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions-rs/toolchain@v1
15+
- uses: actions/checkout@v6
16+
- uses: dtolnay/rust-toolchain@stable
1717
with:
18-
toolchain: stable
19-
override: true
20-
18+
components: "clippy, rustfmt"
2119
# make sure all code has been formatted with rustfmt
2220
- name: check rustfmt
2321
run: |
@@ -35,14 +33,11 @@ jobs:
3533
name: Test
3634
strategy:
3735
matrix:
38-
os: [ubuntu-latest, windows-latest, macOS-latest]
36+
os: [ubuntu-24.04, windows-2022, macos-14]
3937
runs-on: ${{ matrix.os }}
4038
steps:
41-
- uses: actions/checkout@v2
42-
- uses: actions-rs/toolchain@v1
43-
with:
44-
toolchain: stable
45-
override: true
39+
- uses: actions/checkout@v6
40+
- uses: dtolnay/rust-toolchain@stable
4641
- run: cargo fetch
4742
- name: cargo test build
4843
# Note the use of release here means longer compile time, but much
@@ -54,20 +49,17 @@ jobs:
5449

5550
deny-check:
5651
name: cargo-deny
57-
runs-on: ubuntu-latest
52+
runs-on: ubuntu-24.04
5853
steps:
59-
- uses: actions/checkout@v2
60-
- uses: EmbarkStudios/cargo-deny-action@v1
54+
- uses: actions/checkout@v6
55+
- uses: EmbarkStudios/cargo-deny-action@v2
6156

6257
publish-check:
6358
name: Publish Check
6459
runs-on: ubuntu-latest
6560
steps:
66-
- uses: actions/checkout@v2
67-
- uses: actions-rs/toolchain@v1
68-
with:
69-
toolchain: stable
70-
override: true
61+
- uses: actions/checkout@v6
62+
- uses: dtolnay/rust-toolchain@stable
7163
- run: cargo fetch
7264
- name: cargo publish check
7365
run: cargo publish --dry-run

Cargo.lock

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

deny.toml

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,18 @@
11
[advisories]
2-
vulnerability = "deny"
3-
unmaintained = "warn"
4-
yanked = "deny"
5-
notice = "warn"
62
ignore = []
73

84
[bans]
95
multiple-versions = "deny"
10-
deny = []
11-
skip = []
12-
skip-tree = []
136

147
[sources]
158
unknown-registry = "deny"
169
unknown-git = "deny"
1710
required-git-spec = "rev"
18-
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
19-
allow-git = []
2011

2112
[licenses]
22-
private = { ignore = true, registries = ["embark"] }
23-
unlicensed = "deny"
24-
allow-osi-fsf-free = "neither"
25-
# We want really high confidence when inferring licenses from text
26-
confidence-threshold = 0.92
27-
copyleft = "deny"
2813
allow = [
29-
"Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
30-
"MIT", # https://tldrlegal.com/license/mit-license
31-
"Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
14+
"Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
15+
"MIT", # https://tldrlegal.com/license/mit-license
16+
"Unicode-3.0", # https://spdx.org/licenses/Unicode-3.0.html
3217
]
3318
exceptions = []

src/serializer.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,7 @@ where
157157
{
158158
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
159159
if let Ok(buf) = std::str::from_utf8(buf) {
160-
self.writer
161-
.write_str(buf)
162-
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
160+
self.writer.write_str(buf).map_err(std::io::Error::other)?;
163161
}
164162
Ok(buf.len())
165163
}

0 commit comments

Comments
 (0)