Skip to content

Commit

Permalink
style: make clippy happy with must_use
Browse files Browse the repository at this point in the history
  • Loading branch information
GregoryConrad committed Jul 3, 2023
1 parent a0c98ef commit 86582fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions rearch/src/capsule_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ impl MockCapsuleReaderBuilder {
Self::default()
}

#[must_use]
pub fn set<C: Capsule>(mut self, _capsule: &C, data: C::Data) -> Self {
self.0.insert(TypeId::of::<C>(), Box::new(data));
self
}

#[must_use]
pub fn build(self) -> CapsuleReader<'static, 'static> {
CapsuleReader::Mock { mocks: self.0 }
}
Expand Down

0 comments on commit 86582fe

Please sign in to comment.