Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: A-Walrus <58790821+A-Walrus@users.noreply.github.com>
  • Loading branch information
pascalkuthe and A-Walrus authored Jun 24, 2023
1 parent 85dd01b commit 33eced5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion helix-core/src/selection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ impl Range {
/// Map a range through a set of changes. Returns a new range representing
/// the same position after the changes are applied. Note that this
/// function runs in O(N) (N is number of changes) and can therefore
/// cause performance problems if run for a large number of rangs as the
/// cause performance problems if run for a large number of ranges as the
/// complexity is then O(MN) (for multicuror M=N usually). Instead use
/// [Selection::map] or [ChangeSet::update_positions] instead
pub fn map(mut self, changes: &ChangeSet) -> Self {
Expand Down
4 changes: 2 additions & 2 deletions helix-core/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ impl ChangeSet {
self.changes.is_empty() || self.changes == [Operation::Retain(self.len)]
}

/// Map a *sorted* list of position through the changes.
/// Map a *sorted* list of positions through the changes.
///
/// This is equivalent to updating each position with `map_pos`:
///
Expand Down Expand Up @@ -415,7 +415,7 @@ impl ChangeSet {

/// Map a position through the changes.
///
/// `assoc` indicates which size to associate the position with. `Before` will keep the
/// `assoc` indicates which side to associate the position with. `Before` will keep the
/// position close to the character before, and will place it before insertions over that
/// range, or at that point. `After` will move it forward, placing it at the end of such
/// insertions.
Expand Down

0 comments on commit 33eced5

Please sign in to comment.