Skip to content

Commit

Permalink
Fix more doc tests
Browse files Browse the repository at this point in the history
  • Loading branch information
arqunis committed Jul 14, 2017
1 parent 88765d0 commit 682f0f3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/framework/create_command.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,10 @@ impl CreateCommand {
/// # struct Handler;
/// # impl EventHandler for Handler {}
/// use serenity::client::{Client, Context};
/// use serenity::framework::Command;
/// use serenity::model::Message;
/// use std::env;
/// use std::sync::Arc;
///
/// let mut client = Client::new(&env::var("DISCORD_TOKEN").unwrap(), Handler);
///
Expand All @@ -56,7 +58,7 @@ impl CreateCommand {
/// Ok(())
/// }
///
/// fn owner_check(_context: &mut Context, message: &Message) -> bool {
/// fn owner_check(_context: &mut Context, message: &Message, _: &Arc<Command>) -> bool {
/// // replace with your user ID
/// message.author.id == 7
/// }
Expand Down
2 changes: 1 addition & 1 deletion src/model/channel/guild_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ impl GuildChannel {
/// },
/// };
///
/// let _ = msg.channel_id.send_file(file, "cat.png", |m| m.content("here's a cat"));
/// let _ = msg.channel_id.send_files((&file, "cat.png"), |m| m.content("here's a cat"));
/// }
/// }
///
Expand Down
2 changes: 1 addition & 1 deletion src/model/channel/reaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ impl From<char> for ReactionType {
/// # use std::error::Error;
/// #
/// # fn try_main() -> Result<(), Box<Error>> {
/// # let message = ChannelId(0).get_message(0)?;
/// # let message = ChannelId(0).message(0)?;
/// #
/// message.react('🍎')?;
/// # Ok(())
Expand Down

0 comments on commit 682f0f3

Please sign in to comment.