Skip to content

Commit 629bb3b

Browse files
committed
fix: fixed visibility
1 parent ea0dfd3 commit 629bb3b

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

src/network.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ impl<T: Send + std::fmt::Debug> From<SendError<T>> for NetworkError {
4141

4242

4343
#[derive(Clone)]
44-
pub(crate) struct Node {
44+
pub struct Node {
4545
pub id: NodeId,
4646
kind: NodeType,
4747
adjacents: Vec<NodeId>
@@ -86,7 +86,7 @@ impl std::fmt::Debug for Node{
8686

8787
#[derive(Debug, Clone, Default)]
8888
pub struct Network {
89-
pub(crate) nodes: Vec<Node>
89+
pub nodes: Vec<Node>
9090
}
9191

9292
impl Network {

src/packet_processor.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,16 @@ pub trait Processor: Send {
5353
recv(self.controller_recv()) -> cmd => {
5454
if let Ok(cmd) = cmd {
5555
if self.handle_command(cmd) {
56-
std::process::exit(0);
56+
println!("Sto terminando");
57+
return;
5758
}
5859
}
5960
}
6061

6162
recv(self.packet_recv()) -> pkt => {
6263
if let Ok(pkt) = pkt {
6364
if self.handle_packet(pkt).is_err() {
64-
std::process::exit(0);
65+
return;
6566
}
6667
}
6768
}

src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ pub enum ServerType {
459459
MediaServer,
460460
}
461461

462-
#[derive(Debug, Copy, Clone)]
462+
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
463463
pub enum NodeType {
464464
ChatServer,
465465
ChatClient,
@@ -475,7 +475,7 @@ impl Display for NodeType {
475475
Self::WebBrowser => write!(f, "Web-Browser"),
476476
Self::ChatServer => write!(f, "Chat-Server"),
477477
Self::MediaServer => write!(f, "Media-Server"),
478-
Self::TextServer => write!(f, "Text-Server")
478+
Self::TextServer => write!(f, "Text-Server"),
479479
}
480480
}
481481
}

0 commit comments

Comments
 (0)