From b19b031a5052a268f323a116403ea66ca71ea575 Mon Sep 17 00:00:00 2001 From: Zeyla Hellyer Date: Wed, 1 Nov 2017 20:47:08 -0700 Subject: Make the Client return a Result The client now returns a Result in preparation of a future commit. Upgrade path: Handle the case of an error via pattern matching, or unwrap the Result. --- examples/01_basic_ping_bot/src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/01_basic_ping_bot/src') diff --git a/examples/01_basic_ping_bot/src/main.rs b/examples/01_basic_ping_bot/src/main.rs index cf0e6db..a900cc2 100644 --- a/examples/01_basic_ping_bot/src/main.rs +++ b/examples/01_basic_ping_bot/src/main.rs @@ -43,7 +43,7 @@ fn main() { // Create a new instance of the Client, logging in as a bot. This will // automatically prepend your bot token with "Bot ", which is a requirement // by Discord for bot users. - let mut client = Client::new(&token, Handler); + let mut client = Client::new(&token, Handler).expect("Err creating client"); // Finally, start a single shard, and start listening to events. // -- cgit v1.2.3