This commit is contained in:
Andras Schmelczer 2025-06-21 10:52:45 +01:00
commit 1e974c4c9a
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -1,7 +1,7 @@
#[cfg(feature = "serde")] #[cfg(feature = "serde")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
use crate::operation_transformation::Operation; use crate::{Token, operation_transformation::Operation};
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[derive(Debug, Clone, PartialEq)] #[derive(Debug, Clone, PartialEq)]
@ -25,10 +25,9 @@ where
// is left or right. // is left or right.
match &self.operation { match &self.operation {
Operation::Equal { index, .. } => index.to_string(), Operation::Equal { index, .. } => index.to_string(),
Operation::Insert { text, .. } => text Operation::Insert { text, .. } => {
.iter() text.iter().map(Token::original).collect::<String>()
.map(crate::tokenizer::token::Token::original) }
.collect::<String>(),
Operation::Delete { Operation::Delete {
deleted_character_count, deleted_character_count,
.. ..