From d646d51fa0041feea9a2fffde8661b4de0e97be8 Mon Sep 17 00:00:00 2001 From: Alex Kladov Date: Wed, 25 Sep 2024 19:50:44 +0100 Subject: [PATCH] typo --- content/posts/2024-09-24-watermelon-operator.dj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/content/posts/2024-09-24-watermelon-operator.dj b/content/posts/2024-09-24-watermelon-operator.dj index 702ecbcb..f6dcd4e4 100644 --- a/content/posts/2024-09-24-watermelon-operator.dj +++ b/content/posts/2024-09-24-watermelon-operator.dj @@ -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 { @@ -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(f: impl Future) -> JoinHandle; @@ -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 { @@ -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( @@ -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 { @@ -130,7 +130,7 @@ and using Rust's rayon library: ```rust fn process( - db: DataBase, + db: Database, cache: Cache, request: Request, ) -> Response { @@ -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 { @@ -173,7 +173,7 @@ async function process( ```rust async fn process( - db: DataBase, + db: Database, cache: Cache, request: Request, ) -> Response {