Skip to content

Commit be941bb

Browse files
fix docs typos in DurableObject (#431)
* fix docs typos in worker::durable::DurableObject Fix a syntax error (missing comma) and remove a blank line. * docs: Remove redundant field name in assignment If clippy were able to see the code in examples, this would trigger `clippy::redundant_field_names`.
1 parent c57f7a6 commit be941bb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

worker/src/durable.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,9 @@ use worker::*;
713713
#[durable_object]
714714
pub struct Chatroom {
715715
users: Vec<User>,
716-
messages: Vec<Message>
716+
messages: Vec<Message>,
717717
state: State,
718718
env: Env, // access `Env` across requests, use inside `fetch`
719-
720719
}
721720
722721
#[durable_object]
@@ -725,7 +724,7 @@ impl DurableObject for Chatroom {
725724
Self {
726725
users: vec![],
727726
messages: vec![],
728-
state: state,
727+
state,
729728
env,
730729
}
731730
}

0 commit comments

Comments
 (0)