Change style

This commit is contained in:
Andras Schmelczer 2026-03-10 20:42:09 +00:00
parent 408ce5268f
commit deffa195b3
23 changed files with 72 additions and 76 deletions

View file

@ -14,21 +14,21 @@ pub struct Token<T>
where
T: PartialEq + Clone + Debug,
{
/// The normalized form of the token used deriving the diff.
/// The normalized form of the token used deriving the diff
normalized: T,
/// The original string, that should be inserted or deleted in the document.
/// The original string, that should be inserted or deleted in the document
original: String,
/// Whether the token is semantically joinable with the previous token.
/// Whether the token is semantically joinable with the previous token
pub is_left_joinable: bool,
/// Whether the token is semantically joinable with the next token.
/// Whether the token is semantically joinable with the next token
pub is_right_joinable: bool,
}
/// Trivial implementation of Token when the normalized form is the same as the
/// original string.
/// original string
impl From<&str> for Token<String> {
fn from(text: &str) -> Self { Token::new(text.to_owned(), text.to_owned(), true, true) }
}