aboutsummaryrefslogtreecommitdiff
path: root/src/builder/edit_channel.rs
diff options
context:
space:
mode:
authorMaiddog <[email protected]>2017-08-26 17:55:43 -0500
committeralex <[email protected]>2017-08-27 00:55:43 +0200
commit3e0b1032d80a1847558a752e8316d97f9ae58f04 (patch)
treeca65390091cb3c0ab98b6497a1447ba69df3d20d /src/builder/edit_channel.rs
parentUse `$crate` for `Args` (diff)
downloadserenity-3e0b1032d80a1847558a752e8316d97f9ae58f04.tar.xz
serenity-3e0b1032d80a1847558a752e8316d97f9ae58f04.zip
Add ability to play DCA and Opus files. (#148)
Diffstat (limited to 'src/builder/edit_channel.rs')
-rw-r--r--src/builder/edit_channel.rs24
1 files changed, 16 insertions, 8 deletions
diff --git a/src/builder/edit_channel.rs b/src/builder/edit_channel.rs
index e3bf78e..a5d799f 100644
--- a/src/builder/edit_channel.rs
+++ b/src/builder/edit_channel.rs
@@ -27,8 +27,10 @@ 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
}
@@ -37,16 +39,20 @@ 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
}
@@ -59,8 +65,10 @@ 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
}