Skip to content

Commit

Permalink
fix docs typos in DurableObject (#431)
Browse files Browse the repository at this point in the history
* 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`.
  • Loading branch information
eric-seppanen authored Feb 19, 2024
1 parent c57f7a6 commit be941bb
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions worker/src/durable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,9 @@ use worker::*;
#[durable_object]
pub struct Chatroom {
users: Vec<User>,
messages: Vec<Message>
messages: Vec<Message>,
state: State,
env: Env, // access `Env` across requests, use inside `fetch`
}
#[durable_object]
Expand All @@ -725,7 +724,7 @@ impl DurableObject for Chatroom {
Self {
users: vec![],
messages: vec![],
state: state,
state,
env,
}
}
Expand Down

0 comments on commit be941bb

Please sign in to comment.