Skip to content

Commit ae494ba

Browse files
committed
Tweak misuse panic message
1 parent 6da3f60 commit ae494ba

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

datafusion/execution/src/async_stream.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl<T> Emitter<T> {
6060
pub fn emit(&mut self, value: T) -> impl FusedFuture<Output = ()> {
6161
let mut guard = self.slot.lock();
6262
match guard.deref_mut() {
63-
Some(_) => panic!("Misuse: call await immediately after calling emit"),
63+
Some(_) => panic!("Misuse: await was not called after calling emit"),
6464
slot => *slot = Some(value),
6565
}
6666

@@ -81,7 +81,7 @@ impl<T, E> TryEmitter<T, E> {
8181
pub fn emit(&mut self, value: T) -> impl FusedFuture<Output = ()> {
8282
let mut guard = self.slot.lock();
8383
match guard.deref_mut() {
84-
Some(_) => panic!("Misuse: call await immediately after calling emit"),
84+
Some(_) => panic!("Misuse: await was not called after calling emit"),
8585
slot => *slot = Some(Ok::<T, E>(value)),
8686
}
8787

0 commit comments

Comments
 (0)