diff options
Diffstat (limited to 'src/framework/standard/create_group.rs')
| -rw-r--r-- | src/framework/standard/create_group.rs | 12 |
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 } |