Skip to content

Commit

Permalink
Used chain error to get rid of a rogue expect in amethyst_network bun…
Browse files Browse the repository at this point in the history
…dler.rs
  • Loading branch information
Plasticcaz committed Nov 24, 2018
1 parent b19e1aa commit fe1e856
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amethyst_network/src/bundle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ use std::net::SocketAddr;
use serde::{de::DeserializeOwned, Serialize};

use amethyst_core::{
bundle::{Result, SystemBundle},
bundle::{Result, ResultExt, SystemBundle},
shred::DispatcherBuilder,
};

Expand Down Expand Up @@ -33,7 +33,7 @@ where
{
fn build(self, builder: &mut DispatcherBuilder) -> Result<()> {
let socket_system = NetSocketSystem::<T>::new(self.addr, self.filters)
.expect("Failed to open network system.");
.chain_err(|| "Failed to open network system.")?;

builder.add(socket_system, "net_socket", &[]);

Expand Down

0 comments on commit fe1e856

Please sign in to comment.