Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ rustflags = [
"-Wclippy::dbg_macro",
"-Wclippy::debug_assert_with_mut_call",
"-Wclippy::doc_markdown",
"-Wclippy::empty_enum",
"-Wclippy::enum_glob_use",
"-Wclippy::exit",
"-Wclippy::expl_impl_clone_on_copy",
Expand Down Expand Up @@ -39,12 +38,10 @@ rustflags = [
"-Wclippy::map_err_ignore",
"-Wclippy::map_flatten",
"-Wclippy::map_unwrap_or",
"-Wclippy::match_on_vec_items",
"-Wclippy::match_same_arms",
"-Wclippy::match_wild_err_arm",
"-Wclippy::match_wildcard_for_single_variants",
"-Wclippy::mem_forget",
"-Wclippy::mismatched_target_os",
"-Wclippy::missing_enforced_import_renames",
"-Wclippy::mut_mut",
"-Wclippy::mutex_integer",
Expand All @@ -63,7 +60,6 @@ rustflags = [
"-Wclippy::string_add_assign",
"-Wclippy::string_add",
"-Wclippy::string_lit_as_bytes",
"-Wclippy::string_to_string",
"-Wclippy::todo",
"-Wclippy::trait_duplication_in_bounds",
"-Wclippy::unimplemented",
Expand Down
32 changes: 12 additions & 20 deletions .github/workflows/rust-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,12 @@ name: CI
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
override: true

components: "clippy, rustfmt"
# make sure all code has been formatted with rustfmt
- name: check rustfmt
run: |
Expand All @@ -35,14 +33,11 @@ jobs:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
os: [ubuntu-24.04, windows-2022, macos-14]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo test build
# Note the use of release here means longer compile time, but much
Expand All @@ -54,20 +49,17 @@ jobs:

deny-check:
name: cargo-deny
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v2
- uses: EmbarkStudios/cargo-deny-action@v1
- uses: actions/checkout@v6
- uses: EmbarkStudios/cargo-deny-action@v2

publish-check:
name: Publish Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- run: cargo fetch
- name: cargo publish check
run: cargo publish --dry-run
242 changes: 242 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 3 additions & 18 deletions deny.toml
Original file line number Diff line number Diff line change
@@ -1,33 +1,18 @@
[advisories]
vulnerability = "deny"
unmaintained = "warn"
yanked = "deny"
notice = "warn"
ignore = []

[bans]
multiple-versions = "deny"
deny = []
skip = []
skip-tree = []

[sources]
unknown-registry = "deny"
unknown-git = "deny"
required-git-spec = "rev"
allow-registry = ["https://github.com/rust-lang/crates.io-index"]
allow-git = []

[licenses]
private = { ignore = true, registries = ["embark"] }
unlicensed = "deny"
allow-osi-fsf-free = "neither"
# We want really high confidence when inferring licenses from text
confidence-threshold = 0.92
copyleft = "deny"
allow = [
"Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
"MIT", # https://tldrlegal.com/license/mit-license
"Unicode-DFS-2016", # https://spdx.org/licenses/Unicode-DFS-2016.html
"Apache-2.0", # https://tldrlegal.com/license/apache-license-2.0-(apache-2.0)
"MIT", # https://tldrlegal.com/license/mit-license
"Unicode-3.0", # https://spdx.org/licenses/Unicode-3.0.html
]
exceptions = []
4 changes: 1 addition & 3 deletions src/serializer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ where
{
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
if let Ok(buf) = std::str::from_utf8(buf) {
self.writer
.write_str(buf)
.map_err(|err| std::io::Error::new(std::io::ErrorKind::Other, err))?;
self.writer.write_str(buf).map_err(std::io::Error::other)?;
}
Ok(buf.len())
}
Expand Down