edit prediction: Initial implementation of Tree-sitter index (not yet used) (#38301)
Release Notes: - N/A --------- Co-authored-by: Agus <agus@zed.dev> Co-authored-by: oleksiy <oleksiy@zed.dev>
This commit is contained in:
co-authored by
Agus
oleksiy
parent
5d561aa494
commit
64d362cbce
@@ -1095,6 +1095,15 @@ impl<O> From<anyhow::Result<O>> for ConnectionResult<O> {
|
||||
}
|
||||
}
|
||||
|
||||
#[track_caller]
|
||||
pub fn some_or_debug_panic<T>(option: Option<T>) -> Option<T> {
|
||||
#[cfg(debug_assertions)]
|
||||
if option.is_none() {
|
||||
panic!("Unexpected None");
|
||||
}
|
||||
option
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
Reference in New Issue
Block a user