diff options
| author | acdenisSK <[email protected]> | 2017-10-01 21:59:33 +0200 |
|---|---|---|
| committer | acdenisSK <[email protected]> | 2017-10-01 22:14:23 +0200 |
| commit | 1bf4d9cb9823dca8c4bb77147c66eac2d53f609f (patch) | |
| tree | ba14ca714fa7bc1e6ba1d26f10e7c170bdf10ffa /examples/05_command_framework/src | |
| parent | Have `ConnectionStage` derive Copy (diff) | |
| download | serenity-1bf4d9cb9823dca8c4bb77147c66eac2d53f609f.tar.xz serenity-1bf4d9cb9823dca8c4bb77147c66eac2d53f609f.zip | |
`to_owned` -> `to_string`
Diffstat (limited to 'examples/05_command_framework/src')
| -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(); |