aboutsummaryrefslogtreecommitdiff
path: root/src/data/pubsub.rs
diff options
context:
space:
mode:
authorSébastien Crozet <sebcrozet@dimforge.com>2024-01-27 16:49:53 +0100
committerSébastien Crozet <sebastien@crozet.re>2024-01-27 17:13:08 +0100
commitda92e5c2837b27433286cf0dd9d887fd44dda254 (patch)
tree00428ce290288f5c64e53dee13d88ffdde4df0ca /src/data/pubsub.rs
parentaef873f20e7a1ee66b9d4c066884fa794048587b (diff)
downloadrapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.gz
rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.tar.bz2
rapier-da92e5c2837b27433286cf0dd9d887fd44dda254.zip
Fix clippy and enable clippy on CI
Diffstat (limited to 'src/data/pubsub.rs')
-rw-r--r--src/data/pubsub.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/data/pubsub.rs b/src/data/pubsub.rs
index 8c5f41c..619521e 100644
--- a/src/data/pubsub.rs
+++ b/src/data/pubsub.rs
@@ -106,8 +106,7 @@ impl<T> PubSub<T> {
/// Read the i-th message not yet read by the given subsciber.
pub fn read_ith(&self, sub: &Subscription<T>, i: usize) -> Option<&T> {
let cursor = &self.cursors[sub.id as usize];
- self.messages
- .get(cursor.next(self.deleted_messages) as usize + i)
+ self.messages.get(cursor.next(self.deleted_messages) + i)
}
/// Get the messages not yet read by the given subscriber.