1、编译错误 Serde: “cannot find derive macro `Deserialize/Serialize` in this scope”
已经在Cargo.toml中添加如下内容了,也提示添加成功,但是错误依旧:
[dependencies]
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
解决办法:
重开Visual Studio Code,cargo run 编译一次查看效果。