fix dots in BalancingError display

This commit is contained in:
AF 2023-06-18 13:58:01 +00:00
parent 41106290b9
commit c3e992bc10

View File

@ -48,11 +48,11 @@ pub enum BalancingError {
impl Display for BalancingError { impl Display for BalancingError {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self { match self {
Self::Height(height_error) => write!(f, "invalid height: {height_error}"), Self::Height(height_error) => write!(f, "invalid height: {height_error}."),
Self::Balance(hl, hr) => write!(f, "unbalanced node: {hl} {hr}."), Self::Balance(hl, hr) => write!(f, "unbalanced node: {hl} {hr}."),
Self::HeightOverflow => write!(f, "tree height overflow"), Self::HeightOverflow => write!(f, "tree height overflow."),
Self::HeightMismatch { children, parent } => { Self::HeightMismatch { children, parent } => {
write!(f, "child-parent height mismatch: {children:?}, {parent}") write!(f, "child-parent height mismatch: {children:?}, {parent}.")
} }
} }
} }