Skip to content

Commit 5999e72

Browse files
authored
Consistenly apply lifetime elision (#57)
1 parent 74da750 commit 5999e72

7 files changed

Lines changed: 17 additions & 17 deletions

File tree

src/annotations.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ impl Annotation<'_> {
231231

232232
/// Start writing the `/AF` array to specify the associated files of the
233233
/// annotation. PDF 2.0+ or PDF/A-3.
234-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
234+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
235235
self.insert(Name(b"AF")).array().typed()
236236
}
237237
}

src/attributes.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ impl<'a> Attributes<'a> {
2828

2929
/// Set the `/O` attribute to user-defined and start writing the `/P` array
3030
/// with user properties. PDF 1.6+
31-
pub fn user(&mut self) -> TypedArray<'_, UserProperty> {
31+
pub fn user(&mut self) -> TypedArray<'_, UserProperty<'_>> {
3232
self.pair(Name(b"O"), AttributeOwner::User.to_name(false));
3333
self.insert(Name(b"P")).array().typed()
3434
}
@@ -868,7 +868,7 @@ impl<'a> TableAttributes<'a> {
868868

869869
/// Write the `/Headers` attribute to refer to the header cells of the
870870
/// table. PDF 1.6+.
871-
pub fn headers(&mut self) -> TypedArray<'_, Str> {
871+
pub fn headers(&mut self) -> TypedArray<'_, Str<'_>> {
872872
self.dict.insert(Name(b"Headers")).array().typed()
873873
}
874874

src/chunk.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ impl Chunk {
233233
}
234234

235235
/// Start writing a named destination dictionary.
236-
pub fn destinations(&mut self, id: Ref) -> TypedDict<'_, Destination> {
236+
pub fn destinations(&mut self, id: Ref) -> TypedDict<'_, Destination<'_>> {
237237
self.indirect(id).dict().typed()
238238
}
239239

src/color.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -654,7 +654,7 @@ impl DeviceNAttrs<'_> {
654654
///
655655
/// Required if the `/Subtype` attribute is `NChannel`. Required for spot
656656
/// colors in PDF/A-2, PDF/A-3, and PDF/A-4.
657-
pub fn colorants(&mut self) -> TypedDict<'_, Dict> {
657+
pub fn colorants(&mut self) -> TypedDict<'_, Dict<'_>> {
658658
self.dict.insert(Name(b"Colorants")).dict().typed()
659659
}
660660

src/content.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ impl Resources<'_> {
12641264
/// This allows to write property lists with indirect objects for
12651265
/// marked-content sequences. These properties can be used by property lists
12661266
/// using the [`MarkContent::properties_named`] method. PDF 1.2+.
1267-
pub fn properties(&mut self) -> TypedDict<'_, PropertyList> {
1267+
pub fn properties(&mut self) -> TypedDict<'_, PropertyList<'_>> {
12681268
self.insert(Name(b"Properties")).dict().typed()
12691269
}
12701270
}

src/structure.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ impl Catalog<'_> {
127127
///
128128
/// The dictionary maps a vendor name to an extension dictionary. The Adobe
129129
/// PDF extensions use the Name prefix `ADBE`.
130-
pub fn extensions(&mut self) -> TypedDict<'_, DeveloperExtension> {
130+
pub fn extensions(&mut self) -> TypedDict<'_, DeveloperExtension<'_>> {
131131
self.insert(Name(b"Extensions")).dict().typed()
132132
}
133133

@@ -145,13 +145,13 @@ impl Catalog<'_> {
145145
/// dictionary.](writers::OutputIntent)
146146
///
147147
/// Must be present in PDF/X documents, encouraged in PDF/A documents.
148-
pub fn output_intents(&mut self) -> TypedArray<'_, OutputIntent> {
148+
pub fn output_intents(&mut self) -> TypedArray<'_, OutputIntent<'_>> {
149149
self.insert(Name(b"OutputIntents")).array().typed()
150150
}
151151

152152
/// Start writing the `/AF` array to specify the associated files of the
153153
/// document. PDF 2.0+ or PDF/A-3.
154-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
154+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
155155
self.insert(Name(b"AF")).array().typed()
156156
}
157157
}
@@ -408,7 +408,7 @@ impl StructTreeRoot<'_> {
408408

409409
/// Start writing the `/AF` attribute to specify one or multiple files
410410
/// associated with the entire structure tree. PDF 2.0+.
411-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
411+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
412412
self.dict.insert(Name(b"AF")).array().typed()
413413
}
414414
}
@@ -521,13 +521,13 @@ impl StructElement<'_> {
521521

522522
/// Start writing the `/A` attribute to specify the attributes of this
523523
/// structure element.
524-
pub fn attributes(&mut self) -> TypedArray<'_, Attributes> {
524+
pub fn attributes(&mut self) -> TypedArray<'_, Attributes<'_>> {
525525
self.dict.insert(Name(b"A")).array().typed()
526526
}
527527

528528
/// Start writing the `/C` attribute to associate the structure element with
529529
/// an attribute class.
530-
pub fn attribute_class(&mut self) -> TypedArray<'_, Name> {
530+
pub fn attribute_class(&mut self) -> TypedArray<'_, Name<'_>> {
531531
self.dict.insert(Name(b"C")).array().typed()
532532
}
533533

@@ -572,7 +572,7 @@ impl StructElement<'_> {
572572

573573
/// Start writing the `/AF` array to specify the associated files of the
574574
/// element. PDF 2.0+ or PDF/A-3.
575-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
575+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
576576
self.insert(Name(b"AF")).array().typed()
577577
}
578578

@@ -751,7 +751,7 @@ impl ClassMap<'_> {
751751
}
752752

753753
/// Start writing an array of attribute dictionaries for a class name.
754-
pub fn multiple(&mut self, name: Name) -> TypedArray<'_, Attributes> {
754+
pub fn multiple(&mut self, name: Name) -> TypedArray<'_, Attributes<'_>> {
755755
self.dict.insert(name).array().typed()
756756
}
757757
}
@@ -2001,7 +2001,7 @@ impl Page<'_> {
20012001

20022002
/// Start writing the `/AF` array to specify the associated files of the
20032003
/// page. PDF 2.0+ or PDF/A-3.
2004-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
2004+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
20052005
self.insert(Name(b"AF")).array().typed()
20062006
}
20072007
}

src/xobject.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ impl<'a> ImageXObject<'a> {
156156

157157
/// Start writing the `/AF` array to specify the associated files of the
158158
/// image. PDF 2.0+ or PDF/A-3.
159-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
159+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
160160
self.insert(Name(b"AF")).array().typed()
161161
}
162162
}
@@ -270,7 +270,7 @@ impl<'a> FormXObject<'a> {
270270

271271
/// Start writing the `/AF` array to specify the associated files of the
272272
/// Form XObject. PDF 2.0+ or PDF/A-3.
273-
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec> {
273+
pub fn associated_files(&mut self) -> TypedArray<'_, FileSpec<'_>> {
274274
self.insert(Name(b"AF")).array().typed()
275275
}
276276
}

0 commit comments

Comments
 (0)