aboutsummaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-11-10 17:09:24 -0800
committerAustin Hellyer <[email protected]>2016-11-10 17:09:24 -0800
commitb0e1a70418a629eb1cc71339c9ca6dc2ae0ec2a1 (patch)
treedbea47d3cfcf983ba95411fd2e8af35f141cd807 /src/utils
parentImplementing missing HTTP methods (diff)
downloadserenity-b0e1a70418a629eb1cc71339c9ca6dc2ae0ec2a1.tar.xz
serenity-b0e1a70418a629eb1cc71339c9ca6dc2ae0ec2a1.zip
Fix some clippy lints
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/mod.rs b/src/utils/mod.rs
index 103a73e..66f0f70 100644
--- a/src/utils/mod.rs
+++ b/src/utils/mod.rs
@@ -43,12 +43,14 @@ macro_rules! status_concat {
macro_rules! map_nums {
($item:ident; $($entry:ident $value:expr,)*) => {
impl $item {
+ #[allow(dead_code)]
pub fn num(&self) -> u64 {
match *self {
$($item::$entry => $value,)*
}
}
+ #[allow(dead_code)]
pub fn from_num(num: u64) -> Option<Self> {
match num {
$($value => Some($item::$entry),)*
@@ -56,6 +58,7 @@ macro_rules! map_nums {
}
}
+ #[allow(dead_code)]
fn decode(value: Value) -> Result<Self> {
value.as_u64().and_then(Self::from_num).ok_or(Error::Decode(
concat!("Expected valid ", stringify!($item)),