diff options
| author | acdenisSK <[email protected]> | 2017-10-01 21:59:33 +0200 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-10-09 15:46:37 -0700 |
| commit | 0ce8be869eeb2eb700e22f71b2e00872cc96a500 (patch) | |
| tree | 03dd981bc04ba8475333d057705820c3320e3a97 /src/framework/standard/create_command.rs | |
| parent | Have `ConnectionStage` derive Copy (diff) | |
| download | serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.tar.xz serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.zip | |
`to_owned` -> `to_string`
Diffstat (limited to 'src/framework/standard/create_command.rs')
| -rw-r--r-- | src/framework/standard/create_command.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/framework/standard/create_command.rs b/src/framework/standard/create_command.rs index 99798ca..40877b9 100644 --- a/src/framework/standard/create_command.rs +++ b/src/framework/standard/create_command.rs @@ -12,14 +12,14 @@ impl CreateCommand { pub fn batch_known_as(mut self, names: Vec<&str>) -> Self { self.0 .aliases - .extend(names.into_iter().map(|n| n.to_owned())); + .extend(names.into_iter().map(|n| n.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 } @@ -81,7 +81,7 @@ impl CreateCommand { /// Description, used by other commands. pub fn desc(mut self, desc: &str) -> Self { - self.0.desc = Some(desc.to_owned()); + self.0.desc = Some(desc.to_string()); self } @@ -95,7 +95,7 @@ impl CreateCommand { /// Example arguments, used by other commands. pub fn example(mut self, example: &str) -> Self { - self.0.example = Some(example.to_owned()); + self.0.example = Some(example.to_string()); self } @@ -137,7 +137,7 @@ impl CreateCommand { /// .command("ping", |c| c.exec_str("Pong!"))); /// ``` pub fn exec_str(mut self, content: &str) -> Self { - self.0.exec = CommandType::StringResponse(content.to_owned()); + self.0.exec = CommandType::StringResponse(content.to_string()); self } @@ -158,7 +158,7 @@ impl CreateCommand { /// Adds an alias, allowing users to use the command under a different name. pub fn known_as(mut self, name: &str) -> Self { - self.0.aliases.push(name.to_owned()); + self.0.aliases.push(name.to_string()); self } @@ -202,7 +202,7 @@ impl CreateCommand { /// Command usage schema, used by other commands. pub fn usage(mut self, usage: &str) -> Self { - self.0.usage = Some(usage.to_owned()); + self.0.usage = Some(usage.to_string()); self } |