Skip to content

Commit

Permalink
fix: forgot to handle mut self
Browse files Browse the repository at this point in the history
  • Loading branch information
null8626 committed Feb 1, 2024
1 parent 69f7635 commit c04ff08
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions src/app/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,16 @@ macro_rules! interop_methods {
)*};
}

macro_rules! interop_methods_mut {
($(
name:ident => $t:ident,
)*) => {$(
pub fn $name<'a>(&'a mut self) -> crate::interop::$name::$t<'a> {
crate::interop::$name::$t(self)
}
)*};
}

impl App {
api_methods! {
vanilla => VanillaAPI,
Expand All @@ -337,9 +347,12 @@ impl App {

interop_methods! {
markdown => MarkdownAPI,
packwiz => PackwizInterop,
mrpack => MRPackInterop,
worlds => WorldsAPI,
hooks => HooksAPI,
}

interop_methods_mut! {
packwiz => PackwizInterop,
mrpack => MRPackInterop,
}
}

0 comments on commit c04ff08

Please sign in to comment.