Skip to content

Commit

Permalink
gtk: take the closure on last param for ClosureExpression
Browse files Browse the repository at this point in the history
Fixes #639
  • Loading branch information
bilelmoussaoui committed Oct 25, 2021
1 parent c017a45 commit ef65614
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gtk4/src/closure_expression.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ define_expression!(

impl ClosureExpression {
#[doc(alias = "gtk_closure_expression_new")]
pub fn new<F, R>(callback: F, params: &[Expression]) -> Self
pub fn new<F, R>(params: &[Expression], callback: F) -> Self
where
F: Fn(&[Value]) -> R + 'static,
R: ValueType,
Expand All @@ -44,7 +44,7 @@ impl ClosureExpression {
}

#[doc(alias = "gtk_closure_expression_new")]
pub fn with_closure<R>(closure: glib::Closure, params: &[Expression]) -> Self
pub fn with_closure<R>(params: &[Expression], closure: glib::Closure) -> Self
where
R: ValueType,
{
Expand Down

0 comments on commit ef65614

Please sign in to comment.