Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions timely/src/dataflow/channels/pushers/counter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
use std::rc::Rc;
use std::cell::RefCell;

use crate::progress::{ChangeBatch, Timestamp};
use crate::progress::ChangeBatch;
use crate::dataflow::channels::Message;
use crate::communication::Push;
use crate::Accountable;
Expand All @@ -15,7 +15,7 @@ pub struct Counter<T, P> {
produced: Rc<RefCell<ChangeBatch<T>>>,
}

impl<T: Timestamp, C: Accountable, P> Push<Message<T, C>> for Counter<T, P> where P: Push<Message<T, C>> {
impl<T: Clone+Ord, C: Accountable, P> Push<Message<T, C>> for Counter<T, P> where P: Push<Message<T, C>> {
#[inline]
fn push(&mut self, message: &mut Option<Message<T, C>>) {
if let Some(message) = message {
Expand Down Expand Up @@ -48,6 +48,6 @@ impl<T, P> Counter<T, P> where T : Ord+Clone+'static {
/// Ideally, users would not have direct access to a `Counter`, and preventing this is the way
/// to uphold invariants.
#[inline] pub fn give<C: crate::Container>(&mut self, time: T, container: &mut C) where P: Push<Message<T, C>> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove this function in a follow-up PR, but not here. Let's keep this compatible with the currently release version.

if !container.is_empty() { Message::push_at(container, time, &mut self.pushee); }
if !container.is_empty() { Message::push_at(container, time, self); }
}
}
Loading