diff options
| author | acdenisSK <[email protected]> | 2017-08-22 02:22:20 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-22 02:22:20 +0200 |
| commit | 8d51ead1747296eac5f2880332ae3e6de048ea4f (patch) | |
| tree | 1dde4053df7a8fef1e9d68fddbce72cd15b35adb /src/model | |
| parent | Replace `()` with actual error types (diff) | |
| download | serenity-8d51ead1747296eac5f2880332ae3e6de048ea4f.tar.xz serenity-8d51ead1747296eac5f2880332ae3e6de048ea4f.zip | |
Cfg the display impls as well
Diffstat (limited to 'src/model')
| -rw-r--r-- | src/model/misc.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/model/misc.rs b/src/model/misc.rs index 1e37f23..8106c40 100644 --- a/src/model/misc.rs +++ b/src/model/misc.rs @@ -64,6 +64,7 @@ pub enum UserParseError { } +#[cfg(all(feature = "model", feature = "utils"))] impl fmt::Display for UserParseError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) @@ -105,6 +106,7 @@ pub enum UserIdParseError { NotPresentInCache, } +#[cfg(all(feature = "model", feature = "utils"))] impl fmt::Display for UserIdParseError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) @@ -138,6 +140,7 @@ pub enum RoleParseError { InvalidRole, } +#[cfg(all(feature = "model", feature = "utils"))] impl fmt::Display for RoleParseError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) @@ -179,6 +182,7 @@ pub enum RoleIdParseError { NotPresentInCache, } +#[cfg(all(feature = "model", feature = "utils"))] impl fmt::Display for RoleIdParseError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.description()) |