Skip to content

Commit

Permalink
typo
Browse files Browse the repository at this point in the history
  • Loading branch information
matklad committed Sep 25, 2024
1 parent 7ce4265 commit d646d51
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions content/posts/2024-09-24-watermelon-operator.dj
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Notably, writes to the cache and to the database can proceed concurrently. So, s

```rust
async fn process(
db: DataBase,
db: Database,
cache: Cache,
request: Request,
) -> Response {
Expand All @@ -28,7 +28,7 @@ async fn process(
response
}

async fn update_db(db: DataBase, response: Response);
async fn update_db(db: Database, response: Response);
async fn update_cache(cache: Cache, response: Response);

fn spawn<T>(f: impl Future<Output = T>) -> JoinHandle<T>;
Expand All @@ -39,7 +39,7 @@ cache. Here's the same snippet in intra-task style, where we use join function o

```rust
async fn process(
db: DataBase,
db: Database,
cache: Cache,
request: Request,
) -> Response {
Expand All @@ -51,7 +51,7 @@ async fn process(
response
}

async fn update_db(db: DataBase, response: Response) { ... }
async fn update_db(db: Database, response: Response) { ... }
async fn update_cache(cache: Cache, response: Response) { ... }

async fn join<U, V>(
Expand Down Expand Up @@ -114,7 +114,7 @@ To confuse matters further, let's rewrite our example in TypeScript:

```ts
async function process(
db: DataBase,
db: Database,
cache: Cache,
request: Request,
): Response {
Expand All @@ -130,7 +130,7 @@ and using Rust's rayon library:

```rust
fn process(
db: DataBase,
db: Database,
cache: Cache,
request: Request,
) -> Response {
Expand All @@ -156,7 +156,7 @@ Let's zoom in onto the JS and the join examples:

```ts
async function process(
db: DataBase,
db: Database,
cache: Cache,
request: Request
): Response {
Expand All @@ -173,7 +173,7 @@ async function process(

```rust
async fn process(
db: DataBase,
db: Database,
cache: Cache,
request: Request,
) -> Response {
Expand Down

0 comments on commit d646d51

Please sign in to comment.