@@ -974,27 +974,27 @@ impl MailboxSender for MailboxClient {
974
974
}
975
975
976
976
/// Wrapper to turn `PortRef` into a `Sink`.
977
- pub struct PortSink < ' a , C : CanSend , M : RemoteMessage > {
978
- caps : & ' a C ,
977
+ pub struct PortSink < C : CanSend , M : RemoteMessage > {
978
+ caps : C ,
979
979
port : PortRef < M > ,
980
980
}
981
981
982
- impl < ' a , C : CanSend , M : RemoteMessage > PortSink < ' a , C , M > {
982
+ impl < C : CanSend , M : RemoteMessage > PortSink < C , M > {
983
983
/// Create new PortSink
984
- pub fn new ( caps : & ' a C , port : PortRef < M > ) -> Self {
984
+ pub fn new ( caps : C , port : PortRef < M > ) -> Self {
985
985
Self { caps, port }
986
986
}
987
987
}
988
988
989
- impl < ' a , C : CanSend , M : RemoteMessage > Sink < M > for PortSink < ' a , C , M > {
989
+ impl < C : CanSend , M : RemoteMessage > Sink < M > for PortSink < C , M > {
990
990
type Error = MailboxSenderError ;
991
991
992
992
fn poll_ready ( self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
993
993
Poll :: Ready ( Ok ( ( ) ) )
994
994
}
995
995
996
996
fn start_send ( self : Pin < & mut Self > , item : M ) -> Result < ( ) , Self :: Error > {
997
- self . port . send ( self . caps , item)
997
+ self . port . send ( & self . caps , item)
998
998
}
999
999
1000
1000
fn poll_flush ( self : Pin < & mut Self > , _cx : & mut Context < ' _ > ) -> Poll < Result < ( ) , Self :: Error > > {
0 commit comments