From 0ce8be869eeb2eb700e22f71b2e00872cc96a500 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Sun, 1 Oct 2017 21:59:33 +0200 Subject: `to_owned` -> `to_string` --- examples/05_command_framework/src/main.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples/05_command_framework') 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::().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::().unwrap(); -- cgit v1.2.3