Skip to content

Commit

Permalink
Auto merge of #288 - negator:patch-2, r=jdm
Browse files Browse the repository at this point in the history
FusedStream for IpcStream

Implements `FusedStream` trait for `IpcStream`, so allow the usage of the [`select!` macro](https://docs.rs/futures/0.3.18/futures/stream/trait.FusedStream.html).
  • Loading branch information
bors-servo committed Dec 10, 2021
2 parents f700ea3 + 5582ad5 commit f6b3d8f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/asynch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,3 +112,12 @@ where
}
}
}

impl<T> FusedStream for IpcStream<T>
where
T: for<'de> Deserialize<'de> + Serialize,
{
fn is_terminated(&self) -> bool {
self.0.is_terminated()
}
}

0 comments on commit f6b3d8f

Please sign in to comment.