Skip to content

Commit cf92c01

Browse files
committed
Edition 2024 (+rustfmt.toml)
Pleasantly uneventful.
1 parent bd95e9e commit cf92c01

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name = "c2pa-node"
33
version = "0.1.0"
44
license = "MIT"
5-
edition = "2021"
5+
edition = "2024"
66
exclude = ["index.node"]
77

88
[lib]

js-src/Builder.spec.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ describe("Builder", () => {
119119
beforeAll(async () => {
120120
await fs.ensureDir(tempDir);
121121
// Read all test files once
122+
const buffer = await fs.readFile("./tests/fixtures/CA.jpg");
122123
source = {
123-
buffer: await fs.readFile("./tests/fixtures/CA.jpg"),
124+
buffer,
124125
mimeType: "jpeg",
125126
};
126127
testThumbnail = await fs.readFile("./tests/fixtures/thumbnail.jpg");

rustfmt.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
edition = "2024"

src/neon_builder.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
// each license.
1313

1414
use crate::asset::parse_asset;
15-
use crate::error::{as_js_error, Error};
15+
use crate::error::{Error, as_js_error};
1616
use crate::neon_identity_assertion_signer::NeonIdentityAssertionSigner;
1717
use crate::neon_signer::{CallbackSignerConfig, NeonCallbackSigner, NeonLocalSigner};
1818
use crate::runtime::runtime;
@@ -310,7 +310,7 @@ impl NeonBuilder {
310310
match output_stream.rewind() {
311311
Ok(_) => (),
312312
Err(e) => {
313-
return cx.throw_error(format!("Failed to rewind stream: {e}"))
313+
return cx.throw_error(format!("Failed to rewind stream: {e}"));
314314
}
315315
}
316316
match output_stream.read_to_end(&mut buffer) {
@@ -381,7 +381,7 @@ impl NeonBuilder {
381381
match output_stream.rewind() {
382382
Ok(_) => (),
383383
Err(e) => {
384-
return cx.throw_error(format!("Failed to rewind stream: {e}"))
384+
return cx.throw_error(format!("Failed to rewind stream: {e}"));
385385
}
386386
}
387387
match output_stream.read_to_end(&mut buffer) {
@@ -453,7 +453,7 @@ impl NeonBuilder {
453453
match output_stream.rewind() {
454454
Ok(_) => (),
455455
Err(e) => {
456-
return cx.throw_error(format!("Failed to rewind stream: {e}"))
456+
return cx.throw_error(format!("Failed to rewind stream: {e}"));
457457
}
458458
}
459459
match output_stream.read_to_end(&mut buffer) {
@@ -542,7 +542,7 @@ impl NeonBuilder {
542542
_ => {
543543
return cx.throw_error(format!(
544544
"Property '{property}' not found or not a valid type"
545-
))
545+
));
546546
}
547547
}
548548

0 commit comments

Comments
 (0)