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:
Max Brunsfeld 2021-11-30 13:29:04 -08:00
parent 36546463e6
commit 924e1578ea
10 changed files with 197 additions and 436 deletions

View file

@ -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