mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 20:09:19 +00:00
fix clippy::needless_borrow
This commit is contained in:
parent
ff7e057dca
commit
7912e33ed6
36 changed files with 74 additions and 77 deletions
|
@ -74,14 +74,11 @@ pub trait Message: Serialize + DeserializeOwned {
|
|||
impl Message for Request {}
|
||||
impl Message for Response {}
|
||||
|
||||
fn read_json<'a>(
|
||||
inp: &mut impl BufRead,
|
||||
mut buf: &'a mut String,
|
||||
) -> io::Result<Option<&'a String>> {
|
||||
fn read_json<'a>(inp: &mut impl BufRead, buf: &'a mut String) -> io::Result<Option<&'a String>> {
|
||||
loop {
|
||||
buf.clear();
|
||||
|
||||
inp.read_line(&mut buf)?;
|
||||
inp.read_line(buf)?;
|
||||
buf.pop(); // Remove trailing '\n'
|
||||
|
||||
if buf.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue