aboutsummaryrefslogtreecommitdiff
path: root/src/model/misc.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-12-10 10:16:35 -0800
committerAustin Hellyer <[email protected]>2016-12-10 10:16:35 -0800
commit530de25aa5345223fa924e76eb69bb32e484a62a (patch)
treea243a073855f4a8fdc57e122dc52538be76e9414 /src/model/misc.rs
parentDeprecate embed image/thumbnail height/width (diff)
downloadserenity-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.rs6
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, ()> {