Skip to content

Commit

Permalink
Make command macro functions public
Browse files Browse the repository at this point in the history
This will allow the command macro to be used in sub-modules.
  • Loading branch information
Austin Hellyer committed Dec 1, 2016
1 parent 7f04179 commit 62ed564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ext/framework/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ use ::model::Message;
#[macro_export]
macro_rules! command {
($fname:ident($c:ident, $m:ident, $a:ident) $b:block) => {
fn $fname($c: &Context, $m: &Message, $a: Vec<String>) {
pub fn $fname($c: &Context, $m: &Message, $a: Vec<String>) {
$b
}
};
($fname:ident($c:ident, $m:ident, $a:ident, $($name:ident: $t:ty),*) $b:block) => {
fn $fname($c: &Context, $m: &Message, $a: Vec<String>) {
pub fn $fname($c: &Context, $m: &Message, $a: Vec<String>) {
let mut i = $a.iter();

$(
Expand Down

0 comments on commit 62ed564

Please sign in to comment.