mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-25 02:21:37 +08:00
Use proper var names in trait definition
The underscores are too confusing, plus IDE automatically copies them into the implementation, and the `_` is not what most people would expect.
This commit is contained in:
parent
6176b11a30
commit
abbf3291ef
@ -272,11 +272,11 @@ where
|
|||||||
/// call to [`step()`](Aggregate::step) to set up the context for an
|
/// call to [`step()`](Aggregate::step) to set up the context for an
|
||||||
/// invocation of the function. (Note: `init()` will not be called if
|
/// invocation of the function. (Note: `init()` will not be called if
|
||||||
/// there are no rows.)
|
/// there are no rows.)
|
||||||
fn init(&self, _: &mut Context<'_>) -> Result<A>;
|
fn init(&self, ctx: &mut Context<'_>) -> Result<A>;
|
||||||
|
|
||||||
/// "step" function called once for each row in an aggregate group. May be
|
/// "step" function called once for each row in an aggregate group. May be
|
||||||
/// called 0 times if there are no rows.
|
/// 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
|
/// Computes and returns the final result. Will be called exactly once for
|
||||||
/// each invocation of the function. If [`step()`](Aggregate::step) was
|
/// each invocation of the function. If [`step()`](Aggregate::step) was
|
||||||
@ -287,7 +287,7 @@ where
|
|||||||
/// given `None`.
|
/// given `None`.
|
||||||
///
|
///
|
||||||
/// The passed context will have no arguments.
|
/// The passed context will have no arguments.
|
||||||
fn finalize(&self, _: &mut Context<'_>, _: Option<A>) -> Result<T>;
|
fn finalize(&self, ctx: &mut Context<'_>, acc: Option<A>) -> Result<T>;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// `WindowAggregate` is the callback interface for
|
/// `WindowAggregate` is the callback interface for
|
||||||
@ -301,10 +301,10 @@ where
|
|||||||
{
|
{
|
||||||
/// Returns the current value of the aggregate. Unlike xFinal, the
|
/// Returns the current value of the aggregate. Unlike xFinal, the
|
||||||
/// implementation should not delete any context.
|
/// implementation should not delete any context.
|
||||||
fn value(&self, _: Option<&A>) -> Result<T>;
|
fn value(&self, acc: Option<&A>) -> Result<T>;
|
||||||
|
|
||||||
/// Removes a row from the current window.
|
/// 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! {
|
bitflags::bitflags! {
|
||||||
|
Loading…
Reference in New Issue
Block a user