Fix elided_named_lifetimes (#1365)

Signed-off-by: yubiuser <github@yubiuser.dev>
This commit is contained in:
yubiuser 2024-10-06 22:10:02 +02:00 committed by GitHub
parent 8dce30a169
commit 353c696554
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1534,7 +1534,7 @@ struct CommandSender<'a> {
} }
impl<'a> CommandSender<'a> { impl<'a> CommandSender<'a> {
fn new(spirc: &'a mut SpircTask, cmd: MessageType) -> CommandSender<'_> { fn new(spirc: &'a mut SpircTask, cmd: MessageType) -> Self {
let mut frame = protocol::spirc::Frame::new(); let mut frame = protocol::spirc::Frame::new();
// frame version // frame version
frame.set_version(1); frame.set_version(1);
@ -1549,13 +1549,13 @@ impl<'a> CommandSender<'a> {
CommandSender { spirc, frame } CommandSender { spirc, frame }
} }
fn recipient(mut self, recipient: &'a str) -> CommandSender<'_> { fn recipient(mut self, recipient: &'a str) -> Self {
self.frame.recipient.push(recipient.to_owned()); self.frame.recipient.push(recipient.to_owned());
self self
} }
#[allow(dead_code)] #[allow(dead_code)]
fn state(mut self, state: protocol::spirc::State) -> CommandSender<'a> { fn state(mut self, state: protocol::spirc::State) -> Self {
*self.frame.state.mut_or_insert_default() = state; *self.frame.state.mut_or_insert_default() = state;
self self
} }