use inline format args

This commit is contained in:
Daniel Eades 2022-12-30 07:59:11 +00:00
parent 17cc78f169
commit 77051679d7
21 changed files with 61 additions and 109 deletions

View file

@ -128,15 +128,11 @@ impl Connection {
self.sender.send(resp.into()).unwrap();
}
Ok(msg) => {
return Err(ProtocolError(format!(
"expected initialize request, got {:?}",
msg
)))
return Err(ProtocolError(format!("expected initialize request, got {msg:?}")))
}
Err(e) => {
return Err(ProtocolError(format!(
"expected initialize request, got error: {}",
e
"expected initialize request, got error: {e}"
)))
}
};
@ -154,15 +150,11 @@ impl Connection {
match &self.receiver.recv() {
Ok(Message::Notification(n)) if n.is_initialized() => (),
Ok(msg) => {
return Err(ProtocolError(format!(
"expected Message::Notification, got: {:?}",
msg,
)))
return Err(ProtocolError(format!("expected Message::Notification, got: {msg:?}",)))
}
Err(e) => {
return Err(ProtocolError(format!(
"expected initialized notification, got error: {}",
e,
"expected initialized notification, got error: {e}",
)))
}
}