Make Tree::changed_ranges return an Iterator instead of a Vec (#437)

* Make Tree::changed_ranges return an Iterator instead of a Vec

* Remove CBufferIter.free parameter
This commit is contained in:
Tuấn-Anh Nguyễn 2019-08-27 09:36:16 +07:00 committed by Max Brunsfeld
parent d5b5d473ab
commit d96ba09391
5 changed files with 49 additions and 19 deletions

View file

@ -767,7 +767,7 @@ fn test_parsing_with_a_newly_excluded_range() {
);
assert_eq!(
tree.changed_ranges(&first_tree),
tree.changed_ranges(&first_tree).collect::<Vec<_>>(),
vec![
// The first range that has changed syntax is the range of the newly-inserted text.
Range {
@ -837,7 +837,7 @@ fn test_parsing_with_a_newly_included_range() {
);
assert_eq!(
tree.changed_ranges(&first_tree),
tree.changed_ranges(&first_tree).collect::<Vec<_>>(),
vec![Range {
start_byte: first_code_end_index + 1,
end_byte: second_code_end_index + 1,