chore: remove dead code and stale comments

- Drop dead Rooms/Room infrastructure and the rooms field on Context.
- Remove unused ActorMessage::Tick variant and the now-empty handler arm.
- Strip dead active-thread tracking machinery from ThreadPool (unused
  getters, _id/_active_threads/_total_threads parameters).
- Flatten ServerActor::initiate_connection: the duplicated retry block
  was a copy-paste retry against the same address with the same args
  and could never succeed where the first attempt failed.
- Delete commented-out print_hex2/decode debug stubs, dead test
  fixtures in login.rs and message_user.rs, the 47-line commented body
  of RoomListHandler, and assorted // TODO theater.
This commit is contained in:
michel
2026-04-26 17:20:45 +02:00
parent 574833bf61
commit 44846cdfa8
11 changed files with 43 additions and 380 deletions
-47
View File
@@ -93,50 +93,6 @@ impl Message {
trace!("");
}
}
//
// pub fn print_hex2(&self) -> String {
// let data = &self.data;
// let mut out = String::from("");
// const BYTES_PER_LINE: usize = 16;
//
// let chunks = data.chunks(BYTES_PER_LINE);
// for (i, chunk) in chunks.enumerate() {
// // Print the offset
// // out += &format!("{:04x} ", i * BYTES_PER_LINE);
//
// // Print the hexadecimal part
// for j in 0..BYTES_PER_LINE {
// if j < chunk.len() {
// out += &format!("{:02x} ", chunk[j]);
// } else {
// // out += &format!(" ");
// }
//
// // Add extra space in the middle
// // if j == 7 {
// // out += &format!(" ");
// // }
// }
//
// // // Print the ASCII part
// // let mut i = 0;
// // for &byte in chunk {
// // i = i + 1;
// // if byte.is_ascii_graphic() || byte.is_ascii_whitespace() {
// // print!("{}", byte as char);
// // } else {messa
// // print!(".");
// // }
// //
// // if i == 8 {
// // print!(" ");
// // }
// // }
// //
// }
// println!("{:?}", out.trim());
// return out.trim().into();
// }
#[allow(dead_code)]
pub fn get_message_code_u32(&self) -> u32 {
@@ -390,9 +346,6 @@ impl Message {
},
}
}
// pub fn decode(&self) {
// println!("{:?}", self.data);
// }
}
#[test]