aboutsummaryrefslogtreecommitdiff
path: root/src/framework/standard/create_group.rs
diff options
context:
space:
mode:
authoracdenisSK <[email protected]>2017-10-01 21:59:33 +0200
committerZeyla Hellyer <[email protected]>2017-10-09 15:46:37 -0700
commit0ce8be869eeb2eb700e22f71b2e00872cc96a500 (patch)
tree03dd981bc04ba8475333d057705820c3320e3a97 /src/framework/standard/create_group.rs
parentHave `ConnectionStage` derive Copy (diff)
downloadserenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.tar.xz
serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.zip
`to_owned` -> `to_string`
Diffstat (limited to 'src/framework/standard/create_group.rs')
-rw-r--r--src/framework/standard/create_group.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/framework/standard/create_group.rs b/src/framework/standard/create_group.rs
index 15db5a4..1d6d49c 100644
--- a/src/framework/standard/create_group.rs
+++ b/src/framework/standard/create_group.rs
@@ -50,19 +50,19 @@ impl CreateGroup {
for n in &cmd.aliases {
if let Some(ref prefix) = self.0.prefix {
self.0.commands.insert(
- format!("{} {}", prefix, n.to_owned()),
+ format!("{} {}", prefix, n.to_string()),
CommandOrAlias::Alias(format!("{} {}", prefix, command_name.to_string())),
);
} else {
self.0.commands.insert(
- n.to_owned(),
+ n.to_string(),
CommandOrAlias::Alias(command_name.to_string()),
);
}
}
self.0.commands.insert(
- command_name.to_owned(),
+ command_name.to_string(),
CommandOrAlias::Command(Arc::new(cmd)),
);
@@ -71,7 +71,7 @@ impl CreateGroup {
/// Adds a command to group with simplified API.
/// You can return Err(From::from(string)) if there's an error.
- pub fn on(mut self, name: &str,
+ pub fn on(mut self, name: &str,
f: fn(&mut Context, &Message, Args) -> Result<(), CommandError>) -> Self {
let cmd = Arc::new(Command::new(f));
@@ -90,14 +90,14 @@ impl CreateGroup {
///
/// **Note**: It's suggested to call this first when making a group.
pub fn prefix(mut self, desc: &str) -> Self {
- self.0.prefix = Some(desc.to_owned());
+ self.0.prefix = Some(desc.to_string());
self
}
/// Adds a ratelimit bucket.
pub fn bucket(mut self, bucket: &str) -> Self {
- self.0.bucket = Some(bucket.to_owned());
+ self.0.bucket = Some(bucket.to_string());
self
}