diff --git a/.gitignore b/.gitignore index 9111b93..c19bf1b 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ deb/vpncloud/vpncloud deb/vpncloud/vpncloud.1* Stats.ods .sodium-build +wiki diff --git a/src/configfile.rs b/src/configfile.rs index e742b03..249a1b8 100644 --- a/src/configfile.rs +++ b/src/configfile.rs @@ -27,9 +27,9 @@ impl fmt::Display for ParseError { ParseError::Read(ref err) => write!(formatter, "Failed to read config: {}", err), ParseError::Syntax(ref err) => write!(formatter, "Invalid config syntax: {}", err), ParseError::NoDocument => write!(formatter, "Config was empty"), - ParseError::InvalidType(ref exp, ref value) => write!(formatter, "Invalid value encountered for type {}: {:?}", exp, value), + ParseError::InvalidType(exp, ref value) => write!(formatter, "Invalid value encountered for type {}: {:?}", exp, value), ParseError::InvalidOption(ref opt, ref opts) => write!(formatter, "Invalid option value {}, choices were {:?}", opt, opts), - ParseError::Unsupported(ref reason) => write!(formatter, "Failed to decode config: {}", reason), + ParseError::Unsupported(reason) => write!(formatter, "Failed to decode config: {}", reason), ParseError::Other(ref reason) => write!(formatter, "Failed to decode config: {}", reason) } } diff --git a/src/types.rs b/src/types.rs index 40fd4a3..138414f 100644 --- a/src/types.rs +++ b/src/types.rs @@ -224,10 +224,10 @@ pub enum Error { impl fmt::Display for Error { fn fmt(&self, formatter: &mut fmt::Formatter) -> Result<(), fmt::Error> { match *self { - Error::Parse(ref msg) => write!(formatter, "{}", msg), - Error::Socket(ref msg, ref err) => write!(formatter, "{}: {:?}", msg, err), - Error::TunTapDev(ref msg, ref err) => write!(formatter, "{}: {:?}", msg, err), - Error::Crypto(ref msg) => write!(formatter, "{}", msg), + Error::Parse(msg) => write!(formatter, "{}", msg), + Error::Socket(msg, ref err) => write!(formatter, "{}: {:?}", msg, err), + Error::TunTapDev(msg, ref err) => write!(formatter, "{}: {:?}", msg, err), + Error::Crypto(msg) => write!(formatter, "{}", msg), Error::Name(ref name) => write!(formatter, "failed to resolve name '{}'", name), Error::WrongHeaderMagic(net) => write!(formatter, "wrong header magic: {}", bytes_to_hex(&net)), }