1518: Remove a fixme r=matklad a=killercup

Just saw the new release of SmolStr and was reminded of this FIXME I added :)

Co-authored-by: Pascal Hertleif <pascal@technocreatives.com>
This commit is contained in:
bors[bot] 2019-07-10 16:59:44 +00:00
commit 82c3fe7d13

View File

@ -38,9 +38,7 @@ impl<'a> SyntaxText<'a> {
}
pub fn to_smol_string(&self) -> SmolStr {
// FIXME: use `self.chunks().collect()` here too once
// https://github.com/matklad/smol_str/pull/12 is merged and published
self.to_string().into()
self.chunks().collect()
}
pub fn contains(&self, c: char) -> bool {
@ -63,6 +61,10 @@ impl<'a> SyntaxText<'a> {
self.range.len()
}
pub fn is_empty(&self) -> bool {
self.range.is_empty()
}
/// NB, the offsets here are absolute, and this probably doesn't make sense!
pub fn slice(&self, range: impl ops::RangeBounds<TextUnit>) -> SyntaxText<'a> {
let start = match range.start_bound() {