bloaaaat hating

This commit is contained in:
MeexReay 2024-11-12 00:12:05 +03:00
parent 3bb46433e9
commit 09d6196daf

View File

@ -156,19 +156,19 @@ impl<T: Read + Write> MinecraftConnection<T> {
/// Set alive state /// Set alive state
#[cfg(not(feature = "atomic_clone"))] #[cfg(not(feature = "atomic_clone"))]
pub fn set_alive(&mut self, state: bool) { fn set_alive(&mut self, state: bool) {
self.is_alive = state; self.is_alive = state;
} }
/// Set alive state /// Set alive state
#[cfg(feature = "atomic_clone")] #[cfg(feature = "atomic_clone")]
pub fn set_alive(&self, state: bool) { fn set_alive(&self, state: bool) {
self.is_alive.store(state, Ordering::Relaxed); self.is_alive.store(state, Ordering::Relaxed);
} }
/// Is connection alive /// Is connection alive
#[cfg(not(feature = "atomic_clone"))] #[cfg(not(feature = "atomic_clone"))]
pub fn set_alive(&self) -> bool { pub fn is_alive(&self) -> bool {
self.is_alive self.is_alive
} }