Skip to content

Commit

Permalink
Remove unwraps.
Browse files Browse the repository at this point in the history
  • Loading branch information
ximon18 committed Mar 28, 2024
1 parent 4a9f459 commit d5c6cae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/net/server/dgram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ where
) -> Result<(), Error> {
self.command_tx
.lock()
.unwrap()
.map_err(|_| Error::CommandCouldNotBeSent)?
.send(ServerCommand::Reconfigure(config))
.map_err(|_| Error::CommandCouldNotBeSent)
}
Expand Down
4 changes: 2 additions & 2 deletions src/net/server/stream.rs
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ where
) -> Result<(), Error> {
self.command_tx
.lock()
.unwrap()
.map_err(|_| Error::CommandCouldNotBeSent)?
.send(ServerCommand::Reconfigure(config))
.map_err(|_| Error::CommandCouldNotBeSent)
}
Expand All @@ -461,7 +461,7 @@ where
pub fn shutdown(&self) -> Result<(), Error> {
self.command_tx
.lock()
.unwrap()
.map_err(|_| Error::CommandCouldNotBeSent)?
.send(ServerCommand::Shutdown)
.map_err(|_| Error::CommandCouldNotBeSent)
}
Expand Down

0 comments on commit d5c6cae

Please sign in to comment.