You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In chapter 3, in the section entitled "Real-World Applications", it indicates we must add this to our dependencies in Cargo.toml:
[dependencies]
serde = "1.0"
serde_json = "1.0"
But for the code to run it should be:
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
Without these changes cargo build gives errors, such as:
error: cannot find derive macro `Serialize` in this scope
--> src/main.rs:4:10
|
4 | #[derive(Serialize, Deserialize, Debug)]
The text was updated successfully, but these errors were encountered:
glafrance
changed the title
Cargo.toml dependency for serde needs text for feature "derive"
Chapter 3 - Section Real World Applications - Cargo.toml dependency for serde needs text for feature "derive"
Sep 10, 2024
In chapter 3, in the section entitled "Real-World Applications", it indicates we must add this to our dependencies in Cargo.toml:
But for the code to run it should be:
Without these changes cargo build gives errors, such as:
The text was updated successfully, but these errors were encountered: