diff options
| author | Zeyla Hellyer <[email protected]> | 2017-11-01 20:47:08 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-11-03 07:13:38 -0700 |
| commit | b19b031a5052a268f323a116403ea66ca71ea575 (patch) | |
| tree | 0ca71c6736214c40768b409b3a2222f2a3c387ec /examples/04_message_builder/src | |
| parent | Make `Command::aliases` public (diff) | |
| download | serenity-b19b031a5052a268f323a116403ea66ca71ea575.tar.xz serenity-b19b031a5052a268f323a116403ea66ca71ea575.zip | |
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.
Diffstat (limited to 'examples/04_message_builder/src')
| -rw-r--r-- | examples/04_message_builder/src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/04_message_builder/src/main.rs b/examples/04_message_builder/src/main.rs index f349333..1ecd302 100644 --- a/examples/04_message_builder/src/main.rs +++ b/examples/04_message_builder/src/main.rs @@ -45,7 +45,7 @@ fn main() { // Configure the client with your Discord bot token in the environment. let token = env::var("DISCORD_TOKEN") .expect("Expected a token in the environment"); - let mut client = Client::new(&token, Handler); + let mut client = Client::new(&token, Handler).expect("Err creating client"); if let Err(why) = client.start() { println!("Client error: {:?}", why); |