Commit d3211c7d authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

zb: simplify SignalReceiver lifetime

Signed-off-by: default avatarMarc-André Lureau <>
parent 55153376
......@@ -54,14 +54,14 @@ impl<'key> TryFrom<&'key MessageHeader<'_>> for ProxyKey<'key> {
/// Receives signals for [`Proxy`] instances.
/// Use this to receive signals on a given connection for a bunch of proxies at the same time.
pub struct SignalReceiver<'r, 'p> {
pub struct SignalReceiver<'a> {
conn: Connection,
proxies: HashMap<ProxyKey<'static>, &'r Proxy<'p>>,
proxies: HashMap<ProxyKey<'static>, &'a Proxy<'a>>,
assert_impl_all!(SignalReceiver<'_, '_>: Send, Sync, Unpin);
assert_impl_all!(SignalReceiver<'_>: Send, Sync, Unpin);
impl<'r, 'p> SignalReceiver<'r, 'p> {
impl<'a> SignalReceiver<'a> {
/// Create a new `SignalReceiver` instance.
pub fn new(conn: Connection) -> Self {
Self {
......@@ -86,7 +86,7 @@ impl<'r, 'p> SignalReceiver<'r, 'p> {
/// This method will panic if you try to add a proxy with a different associated connection than
/// the one associated with this receiver.
pub fn receive_for<'a: 'p, 'b: 'r, P>(&mut self, proxy: &'b P) -> Result<()>
pub fn receive_for<P>(&mut self, proxy: &'a P) -> Result<()>
P: AsRef<Proxy<'a>>,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment