This commit is contained in:
extrawurst 2022-09-03 10:22:24 +02:00
parent 589536c2c3
commit 0ddec47611
2 changed files with 1 additions and 14 deletions

View File

@ -36,20 +36,6 @@ impl AsyncFetchJob {
)))), )))),
} }
} }
///
pub fn result(&self) -> Option<Result<()>> {
if let Ok(mut state) = self.state.lock() {
if let Some(state) = state.take() {
return match state {
JobState::Request(_) => None,
JobState::Response(result) => Some(result),
};
}
}
None
}
} }
impl AsyncJob for AsyncFetchJob { impl AsyncJob for AsyncFetchJob {

View File

@ -230,6 +230,7 @@ impl AsyncSyntaxJob {
} }
} }
///
pub fn result(&self) -> Option<SyntaxText> { pub fn result(&self) -> Option<SyntaxText> {
if let Ok(mut state) = self.state.lock() { if let Ok(mut state) = self.state.lock() {
if let Some(state) = state.take() { if let Some(state) = state.take() {