mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 22:46:50 +00:00
Make clippy a bit happier
Random drive-by fix. I honestly blame rust-analyzer itself on this,
because I set its watch mode to use `cargo clippy` 🤷
This commit is contained in:
parent
d0ff53de2d
commit
6e87065968
@ -61,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() {
|
||||
|
Loading…
Reference in New Issue
Block a user