aboutsummaryrefslogtreecommitdiff
path: root/examples/05_command_framework
diff options
context:
space:
mode:
Diffstat (limited to 'examples/05_command_framework')
-rw-r--r--examples/05_command_framework/src/main.rs4
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();