summaryrefslogtreecommitdiff
path: root/core/async_cancel.rs
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2021-11-16 09:02:28 -0500
committerGitHub <noreply@github.com>2021-11-16 09:02:28 -0500
commitb2036a4db71afd67a78f932528143fb07faea538 (patch)
treea78612e8868609af7aa6fe9ecf49d3ab0c42c9da /core/async_cancel.rs
parentf9f9ddc5e308809343bbf5c07d4487df5a1b93cf (diff)
refactor: re-export anyhow from deno_core (#12777)
Diffstat (limited to 'core/async_cancel.rs')
-rw-r--r--core/async_cancel.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/async_cancel.rs b/core/async_cancel.rs
index e3110bf13..ab7ec2248 100644
--- a/core/async_cancel.rs
+++ b/core/async_cancel.rs
@@ -537,7 +537,7 @@ mod internal {
#[cfg(test)]
mod tests {
use super::*;
- use crate::error::AnyError;
+ use anyhow::Error;
use futures::future::pending;
use futures::future::poll_fn;
use futures::future::ready;
@@ -652,7 +652,7 @@ mod tests {
// Cancel a spawned task before it actually runs.
let cancel_handle = Rc::new(CancelHandle::new());
let future = spawn(async { panic!("the task should not be spawned") })
- .map_err(AnyError::from)
+ .map_err(Error::from)
.try_or_cancel(&cancel_handle);
cancel_handle.cancel();
let error = future.await.unwrap_err();