mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 19:17:12 +00:00
cargo clippy --fix
This commit is contained in:
parent
423c7dd23a
commit
8ce30264c8
186 changed files with 3056 additions and 3314 deletions
|
|
@ -41,13 +41,13 @@ where
|
|||
|
||||
/// Pushes a new span onto the [`SpanMap`].
|
||||
pub fn push(&mut self, offset: TextSize, span: SpanData<S>) {
|
||||
if cfg!(debug_assertions) {
|
||||
if let Some(&(last_offset, _)) = self.spans.last() {
|
||||
assert!(
|
||||
last_offset < offset,
|
||||
"last_offset({last_offset:?}) must be smaller than offset({offset:?})"
|
||||
);
|
||||
}
|
||||
if cfg!(debug_assertions)
|
||||
&& let Some(&(last_offset, _)) = self.spans.last()
|
||||
{
|
||||
assert!(
|
||||
last_offset < offset,
|
||||
"last_offset({last_offset:?}) must be smaller than offset({offset:?})"
|
||||
);
|
||||
}
|
||||
self.spans.push((offset, span));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue