diff options
| author | Zeyla Hellyer <[email protected]> | 2017-05-23 10:15:26 -0700 |
|---|---|---|
| committer | Zeyla Hellyer <[email protected]> | 2017-05-23 10:15:26 -0700 |
| commit | 8c0aeacadb93d3b56fb98beb882eaef1f79cd652 (patch) | |
| tree | 7c1d26addbf15537c6f69a6ac9623276002b155a /src/builder/edit_profile.rs | |
| parent | Fix {Invite,RichInvite}::url tests (diff) | |
| download | serenity-8c0aeacadb93d3b56fb98beb882eaef1f79cd652.tar.xz serenity-8c0aeacadb93d3b56fb98beb882eaef1f79cd652.zip | |
Add more examples and improve some others
Add examples to some functions, and update some of the old examples to
use the `?` operator instead of unwrapping.
Diffstat (limited to 'src/builder/edit_profile.rs')
| -rw-r--r-- | src/builder/edit_profile.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/builder/edit_profile.rs b/src/builder/edit_profile.rs index d63a512..a4b5c99 100644 --- a/src/builder/edit_profile.rs +++ b/src/builder/edit_profile.rs @@ -18,7 +18,13 @@ impl EditProfile { /// A utility method - [`utils::read_image`] - is provided to read an /// image from a file and return its contents in base64-encoded form: /// - /// ```rust,ignore + /// ```rust,no_run + /// # use serenity::Client; + /// # + /// # let mut client = Client::login(""); + /// # + /// # client.on_message(|context, _| { + /// # /// use serenity::utils; /// /// // assuming a `context` has been bound @@ -29,6 +35,7 @@ impl EditProfile { /// let _ = context.edit_profile(|profile| { /// profile.avatar(Some(&base64)) /// }); + /// # }); /// ``` /// /// [`utils::read_image`]: ../fn.read_image.html |