diff options
| author | Austin Hellyer <[email protected]> | 2016-12-10 10:16:35 -0800 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-12-10 10:16:35 -0800 |
| commit | 530de25aa5345223fa924e76eb69bb32e484a62a (patch) | |
| tree | a243a073855f4a8fdc57e122dc52538be76e9414 /src/model/misc.rs | |
| parent | Deprecate embed image/thumbnail height/width (diff) | |
| download | serenity-530de25aa5345223fa924e76eb69bb32e484a62a.tar.xz serenity-530de25aa5345223fa924e76eb69bb32e484a62a.zip | |
Fix no-cache+method conditional compiles
Additionally, flag imports behind feature flags to avoid unused imports.
Diffstat (limited to 'src/model/misc.rs')
| -rw-r--r-- | src/model/misc.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/model/misc.rs b/src/model/misc.rs index 263362f..0a07738 100644 --- a/src/model/misc.rs +++ b/src/model/misc.rs @@ -78,7 +78,7 @@ impl Mentionable for User { } } -#[cfg(feature = "cache")] +#[cfg(all(feature="cache", feature="methods"))] impl FromStr for User { type Err = (); fn from_str(s: &str) -> StdResult<Self, ()> { @@ -101,7 +101,7 @@ impl FromStr for UserId { } } -#[cfg(feature = "cache")] +#[cfg(all(feature="cache", feature="methods"))] impl FromStr for Role { type Err = (); fn from_str(s: &str) -> StdResult<Self, ()> { @@ -138,7 +138,7 @@ impl FromStr for ChannelId { } } -#[cfg(feature = "cache")] +#[cfg(all(feature="cache", feature="methods"))] impl FromStr for Channel { type Err = (); fn from_str(s: &str) -> StdResult<Self, ()> { |