Skip to content

Commit 7ba0862

Browse files
resolve clippy lints
1 parent 89b6417 commit 7ba0862

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

src/main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
#![allow(dead_code)]
22

3-
use std::io::{self, Stdin};
3+
use std::io;
44
use std::path::PathBuf;
55

66
use clap::Parser;
77
use cli::{ExternSubcommand, InitSubcommand};
88
use colored::Colorize;
99
use directories::BaseDirs;
1010
use error::{IoError, Error};
11-
use game::import::{select_importer, GameImporter};
11+
use game::import::GameImporter;
1212
use once_cell::sync::Lazy;
1313
use project::error::ProjectError;
1414
use project::ProjectKind;

src/server/method/package.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use serde::{Deserialize, Serialize};
22

3-
use crate::package::{cache, Package};
3+
use crate::package::cache;
44
use crate::server::proto::{Id, Response};
55
use crate::ts::package_reference::PackageReference;
66
use crate::TCLI_HOME;

src/server/method/project.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub enum ProjectMethod {
2525
}
2626

2727
impl From<Option<Project>> for ServerError {
28-
fn from(val: Option<Project>) -> Self {
28+
fn from(_val: Option<Project>) -> Self {
2929
ServerError::InvalidContext
3030
}
3131
}

src/server/mod.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ struct RtContext {
8181

8282
/// Create the server runtime from the provided read and write channels.
8383
/// This lives for the lifespan of the process.
84-
pub async fn spawn(read: impl Read, write: impl Write, project_dir: &Path) -> Result<(), Error> {
84+
pub async fn spawn(_read: impl Read, _write: impl Write, project_dir: &Path) -> Result<(), Error> {
8585
let (tx, rx) = mpsc::channel::<Message>();
8686
let cancel = RwLock::new(false);
8787

@@ -100,7 +100,7 @@ pub async fn spawn(read: impl Read, write: impl Write, project_dir: &Path) -> Re
100100
ts::init_repository("https://thunderstore.io", None);
101101

102102
loop {
103-
if let Err(e) = stdin.read_line(&mut line) {
103+
if let Err(_) = stdin.read_line(&mut line) {
104104
panic!("");
105105
};
106106

@@ -172,12 +172,12 @@ async fn route_rq(rq: Request, rt: &mut Runtime) -> Result<(), Error> {
172172
// }
173173
// }
174174

175-
fn respond_msg(recv: Receiver<Message>, cancel: RwLock<bool>) {
175+
fn respond_msg(recv: Receiver<Message>, _cancel: RwLock<bool>) {
176176
let mut stdout = io::stdout();
177177
while let Ok(res) = recv.recv() {
178178
let msg = serde_json::to_string(&res);
179-
stdout.write_all(msg.unwrap().as_bytes());
180-
stdout.write_all("\n".as_bytes());
179+
stdout.write_all(msg.unwrap().as_bytes()).unwrap();
180+
stdout.write_all("\n".as_bytes()).unwrap();
181181
}
182182
}
183183

0 commit comments

Comments
 (0)