Skip to content

Commit

Permalink
multi output
Browse files Browse the repository at this point in the history
  • Loading branch information
30bit committed Apr 16, 2024
1 parent e380ac7 commit 1bf1fd3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/expr.rs
Expand Up @@ -239,12 +239,12 @@ impl<'a, T> Output<'a, T> {
}

#[inline]
pub fn push(self, p: Option<T>, s: &str) {
pub fn push(&mut self, p: Option<T>, s: &str) {
self.buf.push(p, s)
}

#[inline]
pub fn push_fmt(self, p: Option<T>, s: fmt::Arguments) {
pub fn push_fmt(&mut self, p: Option<T>, s: fmt::Arguments) {
self.buf.push_fmt(p, s)
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/expr.rs
Expand Up @@ -10,7 +10,7 @@ fn to_string<'a>(sections: impl IntoIterator<Item = (Option<&'a ()>, &'a str)>)
}

impl expr::State<()> for State {
fn apply(&mut self, prompt: &str, args: expr::Args<()>, output: expr::Output<()>) {
fn apply(&mut self, prompt: &str, args: expr::Args<()>, mut output: expr::Output<()>) {
match prompt {
"uppercase" => output.push(
None,
Expand Down

0 comments on commit 1bf1fd3

Please sign in to comment.