Skip to content

Commit

Permalink
chore: reformatted code
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelFreeze committed Oct 19, 2023
1 parent 07a4947 commit abe643b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/worker/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#![feature(async_fn_in_trait)]
#![deny(unsafe_code)]

#[cfg(feature = "d1")]
pub use betterworker_d1 as d1;
pub use betterworker_macros::{durable_object, event};
#[doc(hidden)]
pub use betterworker_sys;
Expand All @@ -12,8 +14,6 @@ pub use wasm_bindgen;
#[doc(hidden)]
pub use wasm_bindgen_futures;
pub use worker_kv as kv;
#[cfg(feature = "d1")]
pub use betterworker_d1 as d1;

pub mod abort;
pub mod body;
Expand Down
3 changes: 2 additions & 1 deletion lib/worker/src/queue.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,8 @@ where
.map_err(WorkerError::from_js_err)?
.as_string()
.ok_or(WorkerError::InvalidMessageBatch)?;
let value = js_sys::Reflect::get(message, self.0.body_key).map_err(WorkerError::from_js_err)?;
let value =
js_sys::Reflect::get(message, self.0.body_key).map_err(WorkerError::from_js_err)?;
let body = serde_wasm_bindgen::from_value(value)?;

Ok(Message {
Expand Down
3 changes: 2 additions & 1 deletion lib/worker/src/websocket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,8 @@ impl WebSocket {
let error_closure =
self.add_event_handler("error", move |event: web_sys::ErrorEvent| {
let error = event.error();
tx.unbounded_send(Err(WorkerError::from_js_err(error))).unwrap();
tx.unbounded_send(Err(WorkerError::from_js_err(error)))
.unwrap();
})?;

Ok(EventStream {
Expand Down

0 comments on commit abe643b

Please sign in to comment.