summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornea <nea@nea.moe>2023-03-27 23:08:33 +0200
committernea <nea@nea.moe>2023-03-27 23:08:33 +0200
commite20255889940ab3b16d5103e07f4555ab5d8730c (patch)
tree39711e02a8f70fd011a310422053a1207bbfb97b
parent6a0c9acd9f8edbdfb96c5aa4e8543881f5d2a821 (diff)
downloadmgasi-e20255889940ab3b16d5103e07f4555ab5d8730c.tar.gz
mgasi-e20255889940ab3b16d5103e07f4555ab5d8730c.tar.bz2
mgasi-e20255889940ab3b16d5103e07f4555ab5d8730c.zip
Fix lint
-rw-r--r--src/connect.rs8
-rw-r--r--src/convention.rs2
-rw-r--r--src/main.rs4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/connect.rs b/src/connect.rs
index cfebb29..3ffb1a4 100644
--- a/src/connect.rs
+++ b/src/connect.rs
@@ -1,10 +1,10 @@
-use std::future::Future;
+
use anyhow::Result;
-use craftio_rs::{CraftAsyncReader, CraftAsyncWriter, CraftIo, CraftReader, CraftTokioConnection, CraftWrapper, CraftWriter};
+use craftio_rs::{CraftAsyncReader, CraftAsyncWriter, CraftIo, CraftReader, CraftWriter};
use mcproto_rs::protocol::{HasPacketKind, PacketDirection, State};
use mcproto_rs::v1_19_3::{Packet761, Packet761Kind, RawPacket761};
-use tokio::io::{AsyncRead, BufReader};
+use tokio::io::{BufReader};
use tokio::net::tcp::OwnedReadHalf;
use tokio::net::TcpStream;
use tokio::sync::mpsc;
@@ -56,7 +56,7 @@ impl MinecraftClient {
let (read, write) = stream.into_split();
let bufread = BufReader::new(read);
let mut craft_writer = CraftWriter::wrap(write, PacketDirection::ClientBound);
- let mut craft_reader = CraftReader::wrap(bufread, PacketDirection::ServerBound);
+ let craft_reader = CraftReader::wrap(bufread, PacketDirection::ServerBound);
let (send_tx, mut send_recv) = mpsc::unbounded_channel::<WriterAction>();
let send_handle = tokio::spawn(async move {
loop {
diff --git a/src/convention.rs b/src/convention.rs
index ae9a646..c36f4d0 100644
--- a/src/convention.rs
+++ b/src/convention.rs
@@ -3,7 +3,7 @@ use mcproto_rs::types::NamedNbtTag;
use mcproto_rs::v1_19_3::{BookSettings, CommandNode, CommandNodeSpec, CommandsSpec, GameMode, LoginPlaySpec, Packet761, PreviousGameMode, RecipeBookAction, RecipeBookInitSpec, TagType, TypedTagList, UpdateRecipeBookSpec, UpdateRecipesSpec, UpdateTagsSpec};
use crate::nbt;
-use crate::player::Player;
+
pub struct Universe {
pub min_build_height: i32,
diff --git a/src/main.rs b/src/main.rs
index 6c1f95b..24666d0 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -8,8 +8,8 @@ use mcproto_rs::Serializer;
use mcproto_rs::status::{StatusPlayersSpec, StatusSpec, StatusVersionSpec};
use mcproto_rs::types::{BytesSerializer, Chat, IntPosition, ItemStack, NamedNbtTag, RemainingBytes, Vec3};
use mcproto_rs::uuid::UUID4;
-use mcproto_rs::v1_19_3::{BitSet, BlobArray, BookSettings, ChunkDataAndUpdateLightSpec, ChunkDataSpec, ChunkSection, CommandNode, CommandNodeSpec, CommandsSpec, EntityEventSpec, InitializeWorldBorderSpec, KeepAliveClientBoundSpec, LightDataSpec, PalettedContainer, PluginMessageSpec, RecipeBookAction, RecipeBookInitSpec, SetCenterChunkSpec, SetContainerContentSpec, SetDefaultSpawnPositionSpec, SynchronizePlayerPositionSpec, TagType, TypedTagList, UpdateRecipeBookSpec};
-use mcproto_rs::v1_19_3::{GameMode, HandshakeNextState, LoginPlaySpec, LoginSuccessSpec, Packet761, Packet761Kind, PingRequestSpec, PingResponseSpec, PreviousGameMode, SetHeldItemClientSpec, StatusResponseSpec, UpdateRecipesSpec, UpdateTagsSpec};
+use mcproto_rs::v1_19_3::{BitSet, BlobArray, ChunkDataAndUpdateLightSpec, ChunkDataSpec, ChunkSection, EntityEventSpec, InitializeWorldBorderSpec, KeepAliveClientBoundSpec, LightDataSpec, PalettedContainer, PluginMessageSpec, SetCenterChunkSpec, SetContainerContentSpec, SetDefaultSpawnPositionSpec, SynchronizePlayerPositionSpec};
+use mcproto_rs::v1_19_3::{HandshakeNextState, LoginSuccessSpec, Packet761, Packet761Kind, PingRequestSpec, PingResponseSpec, SetHeldItemClientSpec, StatusResponseSpec};
use tokio;
use tokio::net::TcpStream;
use tokio::signal::unix::{signal, SignalKind};