From efa6c11463969b40f24ebf84736fc79f8c5c449d Mon Sep 17 00:00:00 2001 From: Ryo Hirayama Date: Wed, 14 Jun 2023 17:39:16 +0900 Subject: [PATCH] Allow user to write `Result<_, E>` while `use worker::*`; --- worker-sandbox/src/lib.rs | 4 ++-- worker/src/lib.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/worker-sandbox/src/lib.rs b/worker-sandbox/src/lib.rs index 3d5b79d43..a9766a3d2 100644 --- a/worker-sandbox/src/lib.rs +++ b/worker-sandbox/src/lib.rs @@ -533,7 +533,7 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result::Ok(index.to_string().into_bytes()) }); let mut resp = Response::from_stream(stream)?; @@ -645,7 +645,7 @@ pub async fn main(req: Request, env: Env, _ctx: worker::Context) -> Result::Ok(text.as_bytes().to_vec()) }); let mut resp = Response::from_stream(stream)?; diff --git a/worker/src/lib.rs b/worker/src/lib.rs index 5fe5675ef..ec144d7e6 100644 --- a/worker/src/lib.rs +++ b/worker/src/lib.rs @@ -76,4 +76,4 @@ mod socket; mod streams; mod websocket; -pub type Result = StdResult; +pub type Result = StdResult;