Skip to content

Commit 1820313

Browse files
committed
Updated to 2024 edition
1 parent 584597d commit 1820313

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ members = ["qpdf-sys", "qpdf-rs"]
55
[workspace.package]
66
version = "0.3.4"
77
authors = ["Dmitry Pankratov <dmitry@pankratov.net>"]
8-
edition = "2021"
8+
edition = "2024"
99
repository = "https://github.com/ancwrd1/qpdf-rs"
1010
documentation = "https://docs.rs/qpdf"
1111
readme = "README.md"

qpdf-rs/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ impl QPdf {
353353
}
354354

355355
/// Find indirect object by object id and generation
356-
pub fn get_object_by_id(self: &QPdf, obj_id: u32, gen: u32) -> Option<QPdfObject> {
357-
let oh = unsafe { qpdf_sys::qpdf_get_object_by_id(self.inner(), obj_id as _, gen as _) };
356+
pub fn get_object_by_id(self: &QPdf, obj_id: u32, generation: u32) -> Option<QPdfObject> {
357+
let oh = unsafe { qpdf_sys::qpdf_get_object_by_id(self.inner(), obj_id as _, generation as _) };
358358
self.last_error_or_then(|| ()).ok()?;
359359
let obj = QPdfObject::new(self.clone(), oh);
360360
if obj.get_type() != QPdfObjectType::Uninitialized && obj.get_type() != QPdfObjectType::Null {
@@ -365,9 +365,9 @@ impl QPdf {
365365
}
366366

367367
/// Replace indirect object by object id and generation
368-
pub fn replace_object<O: AsRef<QPdfObject>>(self: &QPdf, obj_id: u32, gen: u32, object: O) -> Result<()> {
368+
pub fn replace_object<O: AsRef<QPdfObject>>(self: &QPdf, obj_id: u32, generation: u32, object: O) -> Result<()> {
369369
self.wrap_ffi_call(|| unsafe {
370-
qpdf_sys::qpdf_replace_object(self.inner(), obj_id as _, gen as _, object.as_ref().inner)
370+
qpdf_sys::qpdf_replace_object(self.inner(), obj_id as _, generation as _, object.as_ref().inner)
371371
})
372372
}
373373

rustfmt.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
edition = "2021"
1+
edition = "2024"
22
max_width = 120

0 commit comments

Comments
 (0)