aboutsummaryrefslogtreecommitdiff
path: root/src/builder/edit_profile.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-08-24 15:26:49 +0200
committeracdenisSK <[email protected]>2017-08-24 16:36:01 +0200
commitb3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3 (patch)
tree315e16f7b252d22b5f832302e722a85c9e6a9b6e /src/builder/edit_profile.rs
parentAllow FromStr for User to use REST (#147) (diff)
downloadserenity-b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3.tar.xz
serenity-b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3.zip
Revamp `RwLock` usage in the lib
Also not quite sure if they goofed rustfmt or something, but its changes it did were a bit bizarre.
Diffstat (limited to 'src/builder/edit_profile.rs')
-rw-r--r--src/builder/edit_profile.rs18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/builder/edit_profile.rs b/src/builder/edit_profile.rs
index 3bc121c..6aa4e78 100644
--- a/src/builder/edit_profile.rs
+++ b/src/builder/edit_profile.rs
@@ -61,10 +61,8 @@ impl EditProfile {
///
/// [provided]: #method.password
pub fn email(mut self, email: &str) -> Self {
- self.0.insert(
- "email".to_owned(),
- Value::String(email.to_owned()),
- );
+ self.0
+ .insert("email".to_owned(), Value::String(email.to_owned()));
self
}
@@ -90,10 +88,8 @@ impl EditProfile {
/// [modifying the password]: #method.new_password
/// [modifying the associated email address]: #method.email
pub fn password(mut self, password: &str) -> Self {
- self.0.insert(
- "password".to_owned(),
- Value::String(password.to_owned()),
- );
+ self.0
+ .insert("password".to_owned(), Value::String(password.to_owned()));
self
}
@@ -105,10 +101,8 @@ impl EditProfile {
/// If there are no available discriminators with the requested username,
/// an error will occur.
pub fn username(mut self, username: &str) -> Self {
- self.0.insert(
- "username".to_owned(),
- Value::String(username.to_owned()),
- );
+ self.0
+ .insert("username".to_owned(), Value::String(username.to_owned()));
self
}