From e00fe3ad9e1853443c8905da934ea3983813af89 Mon Sep 17 00:00:00 2001 From: acdenisSK Date: Mon, 14 Aug 2017 22:26:21 +0200 Subject: Update examples --- examples/05_command_framework/src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'examples/05_command_framework/src') diff --git a/examples/05_command_framework/src/main.rs b/examples/05_command_framework/src/main.rs index 467c4ab..c6c0fe4 100644 --- a/examples/05_command_framework/src/main.rs +++ b/examples/05_command_framework/src/main.rs @@ -42,7 +42,7 @@ fn main() { let mut client = Client::new(&token, Handler); { - let mut data = client.data.lock().unwrap(); + let mut data = client.data.lock(); data.insert::(HashMap::default()); } @@ -80,7 +80,7 @@ fn main() { // Increment the number of times this command has been run once. If // the command's name does not exist in the counter, add a default // value of 0. - let mut data = ctx.data.lock().unwrap(); + let mut data = ctx.data.lock(); let counter = data.get_mut::().unwrap(); let entry = counter.entry(command_name.clone()).or_insert(0); *entry += 1; @@ -148,7 +148,7 @@ fn main() { command!(commands(ctx, msg, _args) { let mut contents = "Commands used:\n".to_owned(); - let data = ctx.data.lock().unwrap(); + let data = ctx.data.lock(); let counter = data.get::().unwrap(); for (k, v) in counter { -- cgit v1.2.3