Skip to content

Commit aba414c

Browse files
committed
Avoid eliding lifetimes to make rustc happy
error: hiding a lifetime that's elided elsewhere is confusing --> cryptoki/src/session/object_management.rs:227:25 | 227 | pub fn iter_objects(&self, template: &[Attribute]) -> Result<ObjectHandleIterator> { | ^^^^^ the lifetime is elided here -------------------- the same lifetime is hidden here | = help: the same lifetime is referred to in inconsistent ways, making the signature confusing = note: `-D mismatched-lifetime-syntaxes` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(mismatched_lifetime_syntaxes)]` help: use `'_` for type paths | 227 | pub fn iter_objects(&self, template: &[Attribute]) -> Result<ObjectHandleIterator<'_>> { | ++++ Signed-off-by: Jakub Jelen <[email protected]>
1 parent 1edfea8 commit aba414c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cryptoki/src/session/object_management.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ impl Session {
224224
/// * [`ObjectHandleIterator`] for more information on how to use the iterator
225225
/// * [`Session::iter_objects_with_cache_size`] for a way to specify the cache size
226226
#[inline(always)]
227-
pub fn iter_objects(&self, template: &[Attribute]) -> Result<ObjectHandleIterator> {
227+
pub fn iter_objects(&self, template: &[Attribute]) -> Result<ObjectHandleIterator<'_>> {
228228
self.iter_objects_with_cache_size(template, MAX_OBJECT_COUNT)
229229
}
230230

@@ -248,7 +248,7 @@ impl Session {
248248
&self,
249249
template: &[Attribute],
250250
cache_size: NonZeroUsize,
251-
) -> Result<ObjectHandleIterator> {
251+
) -> Result<ObjectHandleIterator<'_>> {
252252
let template: Vec<CK_ATTRIBUTE> = template.iter().map(Into::into).collect();
253253
ObjectHandleIterator::new(self, template, cache_size)
254254
}

0 commit comments

Comments
 (0)