Add ? operator for Display for HostAndPort
@@ -194,8 +194,8 @@ impl<'a> HostAndPort<&'a str> {
impl<S: AsRef<str>> fmt::Display for HostAndPort<S> {
fn fmt(&self, f: &mut Formatter) -> fmt::Result {
- try!(self.host.fmt(f));
- try!(f.write_str(":"));
+ self.host.fmt(f)?;
+ f.write_str(":")?;
self.port.fmt(f)
}
}
