mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
use inline format args
This commit is contained in:
parent
17cc78f169
commit
77051679d7
21 changed files with 61 additions and 109 deletions
|
@ -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}",
|
||||
)))
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue