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. --- src/model/error.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/model/error.rs') diff --git a/src/model/error.rs b/src/model/error.rs index a66095a..835678a 100644 --- a/src/model/error.rs +++ b/src/model/error.rs @@ -47,7 +47,9 @@ use super::Permissions; /// } /// } /// let token = env::var("DISCORD_BOT_TOKEN")?; -/// let mut client = Client::new(&token, Handler); client.start()?; +/// let mut client = Client::new(&token, Handler).unwrap(); +/// +/// client.start()?; /// # Ok(()) /// # } /// # -- cgit v1.2.3