Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'helix-syntax/src/lib.rs')
| -rw-r--r-- | helix-syntax/src/lib.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/helix-syntax/src/lib.rs b/helix-syntax/src/lib.rs index 074f8727..b7331a3a 100644 --- a/helix-syntax/src/lib.rs +++ b/helix-syntax/src/lib.rs @@ -337,7 +337,7 @@ thread_local! { pub fn with_cursor<T>(f: impl FnOnce(&mut QueryCursor) -> T) -> T { PARSER.with(|parser| { let mut parser = parser.borrow_mut(); - let mut cursor = parser.cursors.pop().unwrap_or_else(QueryCursor::new); + let mut cursor = parser.cursors.pop().unwrap_or_default(); let res = f(&mut cursor); parser.cursors.push(cursor); res |