Skip to content

Commit

Permalink
Merge pull request #86 from primait/docs_typo
Browse files Browse the repository at this point in the history
fix doc typos
  • Loading branch information
matteosister authored Mar 2, 2022
2 parents 41f1655 + 52980ff commit e4af20c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions src/esrs/aggregate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ pub trait Eraser<
}

/// The AggregateManager is responsible for loading an aggregate from the store, mapping commands to events, and
/// persisting those events in the store. Be careful when implenting this trait, as you will be responsible for
/// persisting those events in the store. Be careful when implementing this trait, as you will be responsible for
/// threading AggregateState/Commands/Events correctly. For example, a bad implementation could result in an AggregateState
/// that is not replicated on load.
/// that could not be replicated on load.
///
/// Unless you need to perform side effects as part of your command handling/verification you should implement the
/// safer `Aggregate` trait instead.
Expand Down Expand Up @@ -131,11 +131,11 @@ pub trait AggregateManager: Identifier {
/// events onto the aggregate state.
///
/// An Aggregate should be able to derive its own state from nothing but its initial configuration, and its
/// event stream. Applying the same events, in the same order, to the same aggregate, should always yield an
/// event stream. Applying the same events, in the same order, to the same aggregate, should always yield an
/// identical aggregate state.
///
/// This trait is purposfully _synchronous_. If you are implementing this trait, your aggregate
/// should not have any side effects. If you additional information to handle commands correctly, then
/// This trait is purposefully _synchronous_. If you are implementing this trait, your aggregate
/// should not have any side effects. If you need additional information to handle commands correctly, then
/// consider either looking up that information and placing it in the command, or if that is not an option
/// you can implement the more powerful _asynchronous_ `AggregateManager` trait - it will then be your responsibility to
/// uphold the Aggregate _invariants_.
Expand Down
2 changes: 1 addition & 1 deletion src/esrs/postgres/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ impl<
policies: Vec<Box<Policy>>,
) -> Result<Self, Err> {
let aggregate_name: &str = <T as Identifier>::name();
// Check if table and indexes exist and eventually create them
// Check if table and indexes exist and possibly create them
util::run_preconditions(pool, aggregate_name).await?;

Ok(Self {
Expand Down
2 changes: 1 addition & 1 deletion src/esrs/sqlite/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ impl<
sqlx::query("BEGIN").execute(&pool).await.map(|_| ())?;

let aggregate_name: &str = <T as Identifier>::name();
// Check if table and indexes exist and eventually create them
// Check if table and indexes exist and possibly create them
util::run_preconditions(&pool, aggregate_name).await?;

Ok(Self {
Expand Down

0 comments on commit e4af20c

Please sign in to comment.