Skip to content

Commit

Permalink
fix lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
UkoeHB committed Sep 1, 2024
1 parent 151e6e2 commit ff1e607
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cached.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<T: Clone + Debug> Cached<T> {
/// Moves the value from `Self::Used` to `Self::Unused`.
pub fn set_unused(&mut self) {
if matches!(*self, Self::Used(_)) {
*self = Self::Unused(self.take_used().unwrap());
*self = Self::Unused(self.take_used().expect("cached value should be used"));
}
}

Expand Down

0 comments on commit ff1e607

Please sign in to comment.