diff options
| author | acdenisSK <[email protected]> | 2017-08-24 15:26:49 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-08-24 16:36:01 +0200 |
| commit | b3a5bc89ad1c09290fb1c15ca3b36fe17c3796f3 (patch) | |
| tree | 315e16f7b252d22b5f832302e722a85c9e6a9b6e /src/builder/edit_channel.rs | |
| parent | Allow FromStr for User to use REST (#147) (diff) | |
| download | serenity-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_channel.rs')
| -rw-r--r-- | src/builder/edit_channel.rs | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/src/builder/edit_channel.rs b/src/builder/edit_channel.rs index a5d799f..e3bf78e 100644 --- a/src/builder/edit_channel.rs +++ b/src/builder/edit_channel.rs @@ -27,10 +27,8 @@ impl EditChannel { /// /// [voice]: ../model/enum.ChannelType.html#variant.Voice pub fn bitrate(mut self, bitrate: u64) -> Self { - self.0.insert( - "bitrate".to_owned(), - Value::Number(Number::from(bitrate)), - ); + self.0 + .insert("bitrate".to_owned(), Value::Number(Number::from(bitrate))); self } @@ -39,20 +37,16 @@ impl EditChannel { /// /// Must be between 2 and 100 characters long. pub fn name(mut self, name: &str) -> Self { - self.0.insert( - "name".to_owned(), - Value::String(name.to_owned()), - ); + self.0 + .insert("name".to_owned(), Value::String(name.to_owned())); self } /// The position of the channel in the channel list. pub fn position(mut self, position: u64) -> Self { - self.0.insert( - "position".to_owned(), - Value::Number(Number::from(position)), - ); + self.0 + .insert("position".to_owned(), Value::Number(Number::from(position))); self } @@ -65,10 +59,8 @@ impl EditChannel { /// /// [text]: ../model/enum.ChannelType.html#variant.Text pub fn topic(mut self, topic: &str) -> Self { - self.0.insert( - "topic".to_owned(), - Value::String(topic.to_owned()), - ); + self.0 + .insert("topic".to_owned(), Value::String(topic.to_owned())); self } |