aboutsummaryrefslogtreecommitdiff
path: root/src/model/misc.rs
diff options
context:
space:
mode:
authorAustin Hellyer <[email protected]>2016-12-08 17:37:44 -0800
committerAustin Hellyer <[email protected]>2016-12-09 16:09:46 -0800
commitc7ffc4d4dd1ad63fae7a58f2299497aa3e3a39e7 (patch)
tree438143459a40d423f445647facc336895b2e4d79 /src/model/misc.rs
parentCommand builder, quoted args, and multi-prefixes (diff)
downloadserenity-c7ffc4d4dd1ad63fae7a58f2299497aa3e3a39e7.tar.xz
serenity-c7ffc4d4dd1ad63fae7a58f2299497aa3e3a39e7.zip
Fix some clippy lints
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 e078bac..263362f 100644
--- a/src/model/misc.rs
+++ b/src/model/misc.rs
@@ -97,7 +97,7 @@ impl FromStr for User {
impl FromStr for UserId {
type Err = ();
fn from_str(s: &str) -> StdResult<Self, ()> {
- utils::parse_username(s).ok_or_else(|| ()).map(|x| UserId(x))
+ utils::parse_username(s).ok_or_else(|| ()).map(UserId)
}
}
@@ -120,7 +120,7 @@ impl FromStr for Role {
impl FromStr for RoleId {
type Err = ();
fn from_str(s: &str) -> StdResult<Self, ()> {
- utils::parse_role(s).ok_or_else(|| ()).map(|x| RoleId(x))
+ utils::parse_role(s).ok_or_else(|| ()).map(RoleId)
}
}
@@ -134,7 +134,7 @@ impl FromStr for EmojiIdentifier {
impl FromStr for ChannelId {
type Err = ();
fn from_str(s: &str) -> StdResult<Self, ()> {
- utils::parse_channel(s).ok_or_else(|| ()).map(|x| ChannelId(x))
+ utils::parse_channel(s).ok_or_else(|| ()).map(ChannelId)
}
}