This commit is contained in:
Andras Schmelczer 2025-04-01 22:46:03 +01:00
parent 688fd2f1b1
commit 941100d715
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C
4 changed files with 37 additions and 12 deletions

View file

@ -16,6 +16,7 @@ pub struct CursorPosition {
}
impl CursorPosition {
#[must_use]
pub fn apply_merge_context<T>(&self, context: &MergeContext<T>) -> Self
where
T: PartialEq + Clone + std::fmt::Debug,
@ -40,6 +41,7 @@ pub struct TextWithCursors<'a> {
}
impl<'a> TextWithCursors<'a> {
#[must_use]
pub fn new(text: &'a str, cursors: Vec<CursorPosition>) -> Self {
Self {
text: text.into(),
@ -47,6 +49,7 @@ impl<'a> TextWithCursors<'a> {
}
}
#[must_use]
pub fn new_owned(text: String, cursors: Vec<CursorPosition>) -> Self {
Self {
text: text.into(),