Skip to content

Commit

Permalink
Fix: clippy and fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
Snowiiii committed Aug 25, 2024
1 parent 83aad86 commit 8cff0b4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion pumpkin/src/client/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
use std::{
io::{self, Write},
net::SocketAddr,
rc::Rc,
sync::Arc,
};

Expand Down
10 changes: 5 additions & 5 deletions pumpkin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use client::Client;
use commands::handle_command;
use config::AdvancedConfiguration;

use std::{collections::HashMap, rc::Rc, thread};
use std::{collections::HashMap, thread};

use client::interrupted;
use config::BasicConfiguration;
Expand All @@ -31,7 +31,7 @@ static ALLOC: dhat::Alloc = dhat::Alloc;

#[cfg(not(target_os = "wasi"))]
fn main() -> io::Result<()> {
use std::{borrow::BorrowMut, sync::{Arc, Mutex}};
use std::sync::{Arc, Mutex};

use entity::player::Player;
use pumpkin_core::text::{color::NamedColor, TextComponent};
Expand Down Expand Up @@ -59,9 +59,9 @@ fn main() -> io::Result<()> {
rayon::ThreadPoolBuilder::new().build_global().unwrap();
rt.block_on(async {
const SERVER: Token = Token(0);
use std::{cell::RefCell, time::Instant};
use std::time::Instant;

use rcon::RCONServer;


let time = Instant::now();
let basic_config = BasicConfiguration::load("configuration.toml");
Expand Down Expand Up @@ -99,7 +99,7 @@ fn main() -> io::Result<()> {
let mut clients: HashMap<Token, Client> = HashMap::new();
let mut players: HashMap<Arc<Token>, Arc<Mutex<Player>>> = HashMap::new();

let mut server = Arc::new(Mutex::new(Server::new((
let server = Arc::new(Mutex::new(Server::new((
basic_config,
advanced_configuration,
))));
Expand Down
2 changes: 1 addition & 1 deletion pumpkin/src/rcon/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl RCONServer {

token => {
let done = if let Some(client) = connections.get_mut(&token) {
client.handle(&server, &password).await
client.handle(server, &password).await
} else {
false
};
Expand Down
2 changes: 0 additions & 2 deletions pumpkin/src/server.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
use std::{
cell::{RefCell, RefMut},
collections::HashMap,
io::Cursor,
path::Path,
rc::Rc,
sync::{
atomic::{AtomicI32, Ordering},
Arc, Mutex, MutexGuard,
Expand Down

0 comments on commit 8cff0b4

Please sign in to comment.