Fixed spelling and wording in docs.

This commit is contained in:
Marc Brinkmann 2018-10-26 13:03:51 +02:00
parent 7df2d6f4a3
commit fb3937e741
1 changed files with 6 additions and 7 deletions

View File

@ -10,7 +10,7 @@ use serde::Serialize;
use fault_log::{Fault, FaultLog};
use TargetedMessage;
/// A transaction, user message, etc.
/// A transaction, user message, or other user data.
pub trait Contribution: Eq + Debug + Hash + Send + Sync {}
impl<C> Contribution for C where C: Eq + Debug + Hash + Send + Sync {}
@ -26,11 +26,11 @@ impl<M> Message for M where M: Debug + Send + Sync {}
pub trait SessionIdT: Display + Serialize + Send + Sync + Clone {}
impl<S> SessionIdT for S where S: Display + Serialize + Send + Sync + Clone {}
/// Single algorithm step result.
/// Single algorithm step outcome.
///
/// Each time input (typically in the form of user input or incoming network messages) is provided
/// to an instance of an algorithm, a `Step` is produced as a result, potentially containing
/// output values, fault log and network messages.
/// to an instance of an algorithm, a `Step` is produced, potentially containing output values,
/// a fault log, and network messages.
///
/// Any `Step` **must always be used** by the client application; at the very least the resulting
/// messages must be queued.
@ -38,7 +38,7 @@ impl<S> SessionIdT for S where S: Display + Serialize + Send + Sync + Clone {}
/// ## Handling unused Steps
///
/// In the (rare) case of a `Step` not being of any interest at all, instead of discarding it
/// through `let _ = ...` or similar constructs, the implicit assumption should explicitliy be
/// through `let _ = ...` or similar constructs, the implicit assumption should explicitly be
/// checked instead:
///
/// ```rust,no_run
@ -46,9 +46,8 @@ impl<S> SessionIdT for S where S: Display + Serialize + Send + Sync + Clone {}
/// "Algorithm will never output anything on first proposal");
/// ```
///
/// Should an edge case occur resulting in outgoing messages to be generated, the `assert!` will
/// If an edge case occurs and outgoing messages are generated as a result, the `assert!` will
/// catch it, instead of potentially stalling the algorithm.
>>>>>>> Added suggestion on how to handle `Step` output.
#[must_use = "The algorithm step result must be used."]
#[derive(Debug)]
pub struct Step<D>