diff --git a/src/functions.rs b/src/functions.rs index 7d9eeb7..6dfcb88 100644 --- a/src/functions.rs +++ b/src/functions.rs @@ -272,11 +272,11 @@ where /// call to [`step()`](Aggregate::step) to set up the context for an /// invocation of the function. (Note: `init()` will not be called if /// there are no rows.) - fn init(&self, _: &mut Context<'_>) -> Result; + fn init(&self, ctx: &mut Context<'_>) -> Result; /// "step" function called once for each row in an aggregate group. May be /// called 0 times if there are no rows. - fn step(&self, _: &mut Context<'_>, _: &mut A) -> Result<()>; + fn step(&self, ctx: &mut Context<'_>, acc: &mut A) -> Result<()>; /// Computes and returns the final result. Will be called exactly once for /// each invocation of the function. If [`step()`](Aggregate::step) was @@ -287,7 +287,7 @@ where /// given `None`. /// /// The passed context will have no arguments. - fn finalize(&self, _: &mut Context<'_>, _: Option) -> Result; + fn finalize(&self, ctx: &mut Context<'_>, acc: Option) -> Result; } /// `WindowAggregate` is the callback interface for @@ -301,10 +301,10 @@ where { /// Returns the current value of the aggregate. Unlike xFinal, the /// implementation should not delete any context. - fn value(&self, _: Option<&A>) -> Result; + fn value(&self, acc: Option<&A>) -> Result; /// Removes a row from the current window. - fn inverse(&self, _: &mut Context<'_>, _: &mut A) -> Result<()>; + fn inverse(&self, ctx: &mut Context<'_>, acc: &mut A) -> Result<()>; } bitflags::bitflags! {