mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
actually check for cancelation
This commit is contained in:
parent
71cbdddf1c
commit
8eea10e3ab
3 changed files with 20 additions and 7 deletions
|
@ -38,17 +38,17 @@ pub use ra_editor::{
|
|||
};
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
|
||||
pub struct Cancel;
|
||||
pub struct Canceled;
|
||||
|
||||
pub type Cancelable<T> = Result<T, Cancel>;
|
||||
pub type Cancelable<T> = Result<T, Canceled>;
|
||||
|
||||
impl std::fmt::Display for Cancel {
|
||||
impl std::fmt::Display for Canceled {
|
||||
fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
fmt.write_str("Canceled")
|
||||
}
|
||||
}
|
||||
|
||||
impl std::error::Error for Cancel {
|
||||
impl std::error::Error for Canceled {
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue