Skip to content

Commit

Permalink
Use Rust 2018 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
mbrubeck committed Jul 19, 2021
1 parent 74b3bd7 commit f3c8a4c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name = "uluru"
version = "2.1.1"
authors = ["The Servo Project Developers", "Matt Brubeck <mbrubeck@limpet.net>"]
license = "MPL-2.0"
edition = "2018"
description = "A simple, fast, LRU cache implementation"
repository = "https://github.com/servo/uluru"
keywords = ["cache", "linkedlist", "array", "no_std"]
Expand Down
7 changes: 2 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
//!
//! See the [`LRUCache`](LRUCache) docs for details.
extern crate arrayvec;

use arrayvec::ArrayVec;

use core::fmt;

#[cfg(test)]
Expand Down Expand Up @@ -206,15 +203,15 @@ impl<T, const N: usize> LRUCache<T, N> {
}

/// Iterate over the contents of this cache.
pub fn iter(&self) -> Iter<T, N> {
pub fn iter(&self) -> Iter<'_, T, N> {
Iter {
pos: self.head,
cache: self,
}
}

/// Iterate mutably over the contents of this cache.
fn iter_mut(&mut self) -> IterMut<T, N> {
fn iter_mut(&mut self) -> IterMut<'_, T, N> {
IterMut {
pos: self.head,
cache: self,
Expand Down

0 comments on commit f3c8a4c

Please sign in to comment.