Skip to content

Commit

Permalink
Merge pull request #79 from contentauth/dyross/update-cp2a
Browse files Browse the repository at this point in the history
chore: updates c2pa version
  • Loading branch information
dyro authored Jan 7, 2025
2 parents 7728124 + f65f97f commit 470ee47
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 8 deletions.
6 changes: 1 addition & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ crate-type = ["lib", "cdylib"]
normal = ["openssl-src"]

[dependencies]
c2pa = {version = "0.38.0", features = ["unstable_api", "file_io", "openssl", "pdf", "fetch_remote_manifests"]}
pem = "3.0.3"
serde = { version = "1.0.197", features = ["derive"] }
serde_derive = "1.0"
serde_json = "1.0"
c2pa = {version = "0.40.0", features = ["unstable_api", "file_io", "openssl", "pdf", "fetch_remote_manifests"]}
thiserror = "1.0.49"
uniffi = "0.28.2"
openssl-src = "=300.3.1" # Required for openssl-sys
Expand Down
2 changes: 2 additions & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ yanked = "deny"
ignore = [
"RUSTSEC-2021-0127", # serde_cbor
"RUSTSEC-2023-0071", # rsa Marvin Attack: (https://jira.corp.adobe.com/browse/CAI-5104)
"RUSTSEC-2024-0384", # instant (https://github.com/contentauth/c2pa-rs/issues/663)
"RUSTSEC-2024-0399", # tokio-rustls server: https://rustsec.org/advisories/RUSTSEC-2024-0399
]

[bans]
Expand Down
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
// specific language governing permissions and limitations under
// each license.

// Uniffi is generating a clippy error in their output. This ignores that error.
#![allow(clippy::empty_line_after_doc_comments)]

/// This module exports a C2PA library
use std::env;
use std::sync::RwLock;
Expand Down
6 changes: 3 additions & 3 deletions src/streams.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ impl<'a> From<&'a dyn Stream> for StreamAdapter<'a> {

// impl<'a> c2pa::CAIReadWrite for StreamAdapter<'a> {}

impl<'a> Read for StreamAdapter<'a> {
impl Read for StreamAdapter<'_> {
fn read(&mut self, buf: &mut [u8]) -> std::io::Result<usize> {
let bytes = self
.stream
Expand All @@ -93,7 +93,7 @@ impl<'a> Read for StreamAdapter<'a> {
}
}

impl<'a> Seek for StreamAdapter<'a> {
impl Seek for StreamAdapter<'_> {
fn seek(&mut self, pos: std::io::SeekFrom) -> std::io::Result<u64> {
let (pos, mode) = match pos {
SeekFrom::Current(pos) => (pos, SeekMode::Current),
Expand All @@ -107,7 +107,7 @@ impl<'a> Seek for StreamAdapter<'a> {
}
}

impl<'a> Write for StreamAdapter<'a> {
impl Write for StreamAdapter<'_> {
fn write(&mut self, buf: &[u8]) -> std::io::Result<usize> {
let len = self
.stream
Expand Down

0 comments on commit 470ee47

Please sign in to comment.