aboutsummaryrefslogtreecommitdiff
path: root/src/data/pubsub.rs
diff options
context:
space:
mode:
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.