diff options
| author | Illia K <[email protected]> | 2016-11-28 12:28:23 +0000 |
|---|---|---|
| committer | Austin Hellyer <[email protected]> | 2016-11-28 10:16:22 -0800 |
| commit | 6c2c7b73d9fb5ed46b642e323065c560ffef9ef2 (patch) | |
| tree | 8cb587fd6fcd8e3e06f8960475ea2a54432e3d18 /src/utils/builder | |
| parent | Add an initial tiny test suite to get Travis going (diff) | |
| download | serenity-6c2c7b73d9fb5ed46b642e323065c560ffef9ef2.tar.xz serenity-6c2c7b73d9fb5ed46b642e323065c560ffef9ef2.zip | |
Improve docs and add new message builder methods
Add documentation for some missing methods - such as Game methods - and
add more methods to the Message Builder.
Diffstat (limited to 'src/utils/builder')
| -rw-r--r-- | src/utils/builder/edit_guild.rs | 10 | ||||
| -rw-r--r-- | src/utils/builder/edit_profile.rs | 10 |
2 files changed, 4 insertions, 16 deletions
diff --git a/src/utils/builder/edit_guild.rs b/src/utils/builder/edit_guild.rs index dd4ce84..43e93da 100644 --- a/src/utils/builder/edit_guild.rs +++ b/src/utils/builder/edit_guild.rs @@ -51,14 +51,8 @@ impl EditGuild { /// /// // assuming a `guild` has already been bound /// - /// let base64_icon = match utils::read_image("./guild_icon.png") { - /// Ok(base64_icon) => base64_icon, - /// Err(why) => { - /// println!("Error reading image: {:?}", why); - /// - /// return; - /// }, - /// }; + /// let base64_icon = utils::read_image("./guild_icon.png") + /// .expect("Failed to read image"); /// /// let _ = guild.edit(|g| g.icon(base64_icon)); /// ``` diff --git a/src/utils/builder/edit_profile.rs b/src/utils/builder/edit_profile.rs index 257a8e5..4517ae2 100644 --- a/src/utils/builder/edit_profile.rs +++ b/src/utils/builder/edit_profile.rs @@ -20,14 +20,8 @@ impl EditProfile { /// /// // assuming you are in a context /// - /// let base64 = match utils::read_image("./my_image.jpg") { - /// Ok(base64) => base64, - /// Err(why) => { - /// println!("Error reading image: {:?}", why); - /// - /// return; - /// }, - /// }; + /// let base64 = utils::read_image("./my_image.jpg") + /// .expect("Failed to read image"); /// /// let _ = context.edit_profile(|profile| { /// profile.avatar(Some(base64)) |