Skip to content

Commit bb31114

Browse files
authored
Merge pull request #40 from champtar/canon-json
Switch to canon-json
2 parents 62ff217 + 13a99d1 commit bb31114

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ concurrency:
1818
env:
1919
CARGO_TERM_COLOR: always
2020
# Pinned toolchain for linting
21-
ACTIONS_LINTS_TOOLCHAIN: 1.76.0
21+
ACTIONS_LINTS_TOOLCHAIN: 1.86.0
2222

2323
jobs:
2424
tests-stable:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ keywords = ["oci", "opencontainers", "docker", "podman", "containers"]
1010
[dependencies]
1111
camino = "1.0.4"
1212
chrono = "0.4.19"
13-
olpc-cjson = "0.1.1"
1413
cap-std-ext = "4.0"
1514
flate2 = { features = ["zlib"], default-features = false, version = "1.0.20" }
1615
hex = "0.4.3"
@@ -21,6 +20,7 @@ tar = "0.4.38"
2120
thiserror = "2"
2221
oci-spec = "0.7.0"
2322
zstd = { version = "0.13.2", optional = true }
23+
canon-json = "0.2.0"
2424

2525
[dev-dependencies]
2626
anyhow = "1.0.89"

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#![doc = include_str!("../README.md")]
22

3+
use canon_json::CanonicalFormatter;
34
use cap_std::fs::{Dir, DirBuilderExt};
45
use cap_std_ext::cap_tempfile;
56
use cap_std_ext::dirext::CapStdExtDirExt;
@@ -9,7 +10,6 @@ use oci_spec::image::{
910
self as oci_image, Descriptor, Digest, ImageConfiguration, ImageIndex, ImageManifest,
1011
Sha256Digest,
1112
};
12-
use olpc_cjson::CanonicalFormatter;
1313
use openssl::hash::{Hasher, MessageDigest};
1414
use serde::{Deserialize, Serialize};
1515
use std::collections::{HashMap, HashSet};
@@ -145,7 +145,7 @@ pub struct BlobWriter<'a> {
145145
size: u64,
146146
}
147147

148-
impl<'a> Debug for BlobWriter<'a> {
148+
impl Debug for BlobWriter<'_> {
149149
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
150150
f.debug_struct("BlobWriter")
151151
.field("target", &self.target)
@@ -698,7 +698,7 @@ impl<'a> BlobWriter<'a> {
698698
}
699699
}
700700

701-
impl<'a> std::io::Write for BlobWriter<'a> {
701+
impl std::io::Write for BlobWriter<'_> {
702702
fn write(&mut self, srcbuf: &[u8]) -> std::io::Result<usize> {
703703
self.hash.update(srcbuf)?;
704704
self.target
@@ -735,7 +735,7 @@ impl<'a> GzipLayerWriter<'a> {
735735
}
736736
}
737737

738-
impl<'a> std::io::Write for GzipLayerWriter<'a> {
738+
impl std::io::Write for GzipLayerWriter<'_> {
739739
fn write(&mut self, data: &[u8]) -> std::io::Result<usize> {
740740
self.0.write(data)
741741
}
@@ -781,7 +781,7 @@ impl<'a> ZstdLayerWriter<'a> {
781781
}
782782

783783
#[cfg(feature = "zstd")]
784-
impl<'a> std::io::Write for ZstdLayerWriter<'a> {
784+
impl std::io::Write for ZstdLayerWriter<'_> {
785785
fn write(&mut self, data: &[u8]) -> std::io::Result<usize> {
786786
self.0.write(data)
787787
}

0 commit comments

Comments
 (0)