Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "c2pa-node"
version = "0.1.0"
license = "MIT"
edition = "2021"
edition = "2024"
exclude = ["index.node"]

[lib]
Expand Down
3 changes: 2 additions & 1 deletion js-src/Builder.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ describe("Builder", () => {
beforeAll(async () => {
await fs.ensureDir(tempDir);
// Read all test files once
const buffer = await fs.readFile("./tests/fixtures/CA.jpg");
source = {
buffer: await fs.readFile("./tests/fixtures/CA.jpg"),
buffer,
mimeType: "jpeg",
};
testThumbnail = await fs.readFile("./tests/fixtures/thumbnail.jpg");
Expand Down
1 change: 1 addition & 0 deletions rustfmt.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
edition = "2024"
10 changes: 5 additions & 5 deletions src/neon_builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// each license.

use crate::asset::parse_asset;
use crate::error::{as_js_error, Error};
use crate::error::{Error, as_js_error};
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatter did its thing there and below.

use crate::neon_identity_assertion_signer::NeonIdentityAssertionSigner;
use crate::neon_signer::{CallbackSignerConfig, NeonCallbackSigner, NeonLocalSigner};
use crate::runtime::runtime;
Expand Down Expand Up @@ -310,7 +310,7 @@ impl NeonBuilder {
match output_stream.rewind() {
Ok(_) => (),
Err(e) => {
return cx.throw_error(format!("Failed to rewind stream: {e}"))
return cx.throw_error(format!("Failed to rewind stream: {e}"));
}
}
match output_stream.read_to_end(&mut buffer) {
Expand Down Expand Up @@ -381,7 +381,7 @@ impl NeonBuilder {
match output_stream.rewind() {
Ok(_) => (),
Err(e) => {
return cx.throw_error(format!("Failed to rewind stream: {e}"))
return cx.throw_error(format!("Failed to rewind stream: {e}"));
}
}
match output_stream.read_to_end(&mut buffer) {
Expand Down Expand Up @@ -453,7 +453,7 @@ impl NeonBuilder {
match output_stream.rewind() {
Ok(_) => (),
Err(e) => {
return cx.throw_error(format!("Failed to rewind stream: {e}"))
return cx.throw_error(format!("Failed to rewind stream: {e}"));
}
}
match output_stream.read_to_end(&mut buffer) {
Expand Down Expand Up @@ -542,7 +542,7 @@ impl NeonBuilder {
_ => {
return cx.throw_error(format!(
"Property '{property}' not found or not a valid type"
))
));
}
}

Expand Down