Skip to content
This repository was archived by the owner on Oct 2, 2024. It is now read-only.

Commit c1ff349

Browse files
committed
Simplify trait bounds
1 parent bd4734e commit c1ff349

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/main.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use anyhow::{bail, Context, Result};
66
use clap::Parser;
77
use serde_json::Value;
88
use tokio::{
9-
io::{self, AsyncBufRead, AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader},
9+
io::{self, AsyncBufReadExt, AsyncReadExt, AsyncWriteExt, BufReader},
1010
process::{ChildStdin, ChildStdout, Command},
1111
sync::{broadcast, mpsc},
1212
};
@@ -19,7 +19,6 @@ mod config;
1919

2020
async fn read_content_length<T>(reader: &mut BufReader<T>) -> Result<usize>
2121
where
22-
BufReader<T>: AsyncBufRead,
2322
BufReader<T>: AsyncBufReadExt,
2423
T: Unpin,
2524
{
@@ -46,7 +45,6 @@ where
4645

4746
async fn read_message<T>(reader: &mut BufReader<T>) -> Result<Value>
4847
where
49-
BufReader<T>: AsyncBufRead,
5048
BufReader<T>: AsyncBufReadExt,
5149
T: Unpin,
5250
{
@@ -178,9 +176,8 @@ async fn main() -> Result<()> {
178176
if lsp_config.languages.is_empty() {
179177
if let Some(lang) = cli.language.as_deref() {
180178
bail!("No language server found for {}.", lang);
181-
} else {
182-
bail!("No language server found.");
183179
}
180+
bail!("No language server found.");
184181
}
185182
run(lsp_config).await?;
186183
Ok(())

0 commit comments

Comments
 (0)