From 19dba1992288db0362b59736e142223d806098f1 Mon Sep 17 00:00:00 2001 From: Ruwanka De Silva Date: Sun, 8 Dec 2024 13:38:46 +0100 Subject: [PATCH] Update spawning.md with Cargo.toml update for example Add required Cargo.toml changes for example hello-redis to be able to invoke as an example --- content/tokio/tutorial/spawning.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/content/tokio/tutorial/spawning.md b/content/tokio/tutorial/spawning.md index 4b282870..ba52138e 100644 --- a/content/tokio/tutorial/spawning.md +++ b/content/tokio/tutorial/spawning.md @@ -12,6 +12,14 @@ $ mkdir -p examples $ mv src/main.rs examples/hello-redis.rs ``` +Then add following section to `Cargo.toml` + +```toml +[[example]] +name = "hello-redis" +path = "examples/hello-redis.rs" +``` + Then create a new, empty `src/main.rs` and continue. # Accepting sockets