diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-12 07:52:38 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2018-12-12 07:52:38 +0000 |
commit | 0156a538089828340a823ed02da8970bf4f1175b (patch) | |
tree | 07c4eacaad717ea802ab26972f45223281f2c9c1 /crates/ra_syntax/src/text_utils.rs | |
parent | f655f993fe6d9faa81b0e776b9b24308d2ea1c68 (diff) | |
parent | 0527e3b283af0153cf13fa64fe73862a5b7655c8 (diff) |
Merge #276
276: Extract and rename AtomEdit and Edit into ra_text_edit r=matklad a=vemoo
As discused in #105
Co-authored-by: Bernardo <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/text_utils.rs')
-rw-r--r-- | crates/ra_syntax/src/text_utils.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/crates/ra_syntax/src/text_utils.rs b/crates/ra_syntax/src/text_utils.rs index a90f8a083..417d43e1b 100644 --- a/crates/ra_syntax/src/text_utils.rs +++ b/crates/ra_syntax/src/text_utils.rs | |||
@@ -1,8 +1,4 @@ | |||
1 | use crate::{TextRange, TextUnit}; | 1 | use crate::TextRange; |
2 | |||
3 | pub fn contains_offset_nonstrict(range: TextRange, offset: TextUnit) -> bool { | ||
4 | range.start() <= offset && offset <= range.end() | ||
5 | } | ||
6 | 2 | ||
7 | pub fn intersect(r1: TextRange, r2: TextRange) -> Option<TextRange> { | 3 | pub fn intersect(r1: TextRange, r2: TextRange) -> Option<TextRange> { |
8 | let start = r1.start().max(r2.start()); | 4 | let start = r1.start().max(r2.start()); |