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 /examples/05_command_framework | |
| parent | Have `ConnectionStage` derive Copy (diff) | |
| download | serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.tar.xz serenity-0ce8be869eeb2eb700e22f71b2e00872cc96a500.zip | |
`to_owned` -> `to_string`
Diffstat (limited to 'examples/05_command_framework')
| -rw-r--r-- | examples/05_command_framework/src/main.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/05_command_framework/src/main.rs b/examples/05_command_framework/src/main.rs index e68f9d2..437c44e 100644 --- a/examples/05_command_framework/src/main.rs +++ b/examples/05_command_framework/src/main.rs @@ -94,7 +94,7 @@ fn main() { // value of 0. let mut data = ctx.data.lock(); let counter = data.get_mut::<CommandCounter>().unwrap(); - let entry = counter.entry(command_name.to_owned()).or_insert(0); + let entry = counter.entry(command_name.to_string()).or_insert(0); *entry += 1; true // if `before` returns false, command processing doesn't happen. @@ -163,7 +163,7 @@ fn main() { // "multiply" command below for some of the power that the `command!` macro can // bring. command!(commands(ctx, msg, _args) { - let mut contents = "Commands used:\n".to_owned(); + let mut contents = "Commands used:\n".to_string(); let data = ctx.data.lock(); let counter = data.get::<CommandCounter>().unwrap(); |