Port try macro to new ? operator. (#3962)
* initial untry sweep * restore try in ipc codegen, fix inference * change a few missed try instances
This commit is contained in:
committed by
Arkadiy Paronyan
parent
b1ef52a6d7
commit
8125b5690c
@@ -183,7 +183,7 @@ impl EthSync {
|
||||
};
|
||||
|
||||
let chain_sync = ChainSync::new(params.config, &*params.chain);
|
||||
let service = try!(NetworkService::new(try!(params.network_config.clone().into_basic())));
|
||||
let service = NetworkService::new(params.network_config.clone().into_basic()?)?;
|
||||
|
||||
let sync = Arc::new(EthSync {
|
||||
network: service,
|
||||
@@ -507,8 +507,8 @@ impl NetworkConfiguration {
|
||||
Ok(BasicNetworkConfiguration {
|
||||
config_path: self.config_path,
|
||||
net_config_path: self.net_config_path,
|
||||
listen_address: match self.listen_address { None => None, Some(addr) => Some(try!(SocketAddr::from_str(&addr))) },
|
||||
public_address: match self.public_address { None => None, Some(addr) => Some(try!(SocketAddr::from_str(&addr))) },
|
||||
listen_address: match self.listen_address { None => None, Some(addr) => Some(SocketAddr::from_str(&addr)?) },
|
||||
public_address: match self.public_address { None => None, Some(addr) => Some(SocketAddr::from_str(&addr)?) },
|
||||
udp_port: self.udp_port,
|
||||
nat_enabled: self.nat_enabled,
|
||||
discovery_enabled: self.discovery_enabled,
|
||||
|
||||
Reference in New Issue
Block a user