use crate::godot_panic;
pub trait OptionExt<T> {
fn godot_unwrap(self) -> T;
fn godot_expect(self, msg: &str) -> T;
}
#[allow(clippy::single_match_else)] impl<T> OptionExt<T> for Option<T> {
fn godot_unwrap(self) -> T {
self.unwrap_or_else(|| godot_panic!("called `Option::unwrap()` on a `None` value"))
}
fn godot_expect(self, msg: &str) -> T {
self.unwrap_or_else(|| godot_panic!("{}", msg))
}
}