aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormetamuffin <metamuffin@disroot.org>2025-06-03 21:16:49 +0200
committermetamuffin <metamuffin@disroot.org>2025-06-03 21:16:49 +0200
commit14b44bdbd5dcc5c743dfb0e0197de6c4065a2821 (patch)
treecdea12a7e74a45ebaa5e03a12083a86b884052c5
parent837868a90165c1021cfe24ffd030344a459b1ba0 (diff)
downloadhurrycurry-14b44bdbd5dcc5c743dfb0e0197de6c4065a2821.tar
hurrycurry-14b44bdbd5dcc5c743dfb0e0197de6c4065a2821.tar.bz2
hurrycurry-14b44bdbd5dcc5c743dfb0e0197de6c4065a2821.tar.zst
cleanup old todos
-rw-r--r--server/client-lib/src/network/sync.rs2
-rw-r--r--server/src/commands.rs2
2 files changed, 1 insertions, 3 deletions
diff --git a/server/client-lib/src/network/sync.rs b/server/client-lib/src/network/sync.rs
index 45e84829..6199bd9d 100644
--- a/server/client-lib/src/network/sync.rs
+++ b/server/client-lib/src/network/sync.rs
@@ -68,7 +68,7 @@ impl Network {
match sock.get_mut() {
MaybeTlsStream::Plain(s) => s.set_nonblocking(true)?,
MaybeTlsStream::Rustls(s) => s.sock.set_nonblocking(true)?,
- _ => todo!(),
+ _ => unreachable!(),
};
info!("Handshake complete.");
diff --git a/server/src/commands.rs b/server/src/commands.rs
index 5be9e662..a0702a05 100644
--- a/server/src/commands.rs
+++ b/server/src/commands.rs
@@ -341,7 +341,6 @@ impl Server {
.data
.get_item_by_name(&item)
.ok_or(tre!("s.error.item_not_found", s = item))?;
- #[cfg(not(test))] // TODO rust-analyser does not undestand trait upcasting
if self.entities.iter().any(|e| {
<dyn std::any::Any>::downcast_ref::<Tutorial>(e.as_ref())
.is_some_and(|t| t.player == player)
@@ -351,7 +350,6 @@ impl Server {
self.entities.push(Box::new(Tutorial::new(player, item)));
}
Command::EndTutorial => {
- #[cfg(not(test))] // TODO rust-analyser does not undestand trait upcasting
if let Some(tutorial) = self
.entities
.iter_mut()