Use &Snapshot
directly instead of impl Into<Content<'a>>
The text::Buffer and its snapshot already used the same representation for their content, so we can just make Buffer deref to a Snapshot.
This commit is contained in:
parent
36546463e6
commit
924e1578ea
10 changed files with 197 additions and 436 deletions
|
@ -3630,7 +3630,7 @@ mod tests {
|
|||
let cursor_positions = buffer
|
||||
.selection_set(selection_set_id)
|
||||
.unwrap()
|
||||
.selections::<Point, _>(&*buffer)
|
||||
.selections::<Point>(&*buffer)
|
||||
.map(|selection| {
|
||||
assert_eq!(selection.start, selection.end);
|
||||
selection.start
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue