Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: cannot find derive macro Deserialize in this scope #7

Open
ben-sedg opened this issue May 1, 2023 · 0 comments
Open

error: cannot find derive macro Deserialize in this scope #7

ben-sedg opened this issue May 1, 2023 · 0 comments

Comments

@ben-sedg
Copy link

ben-sedg commented May 1, 2023

[main] error: cannot find derive macro Deserialize in this scope
[Build] --> src/like.rs:12:17
[Build] |
[Build] 12 | #[derive(Debug, Deserialize, Serialize)]
[Build] | ^^^^^^^^^^^
[Build] |
[Build] note: Deserialize is imported here, but it is only a trait, without a derive macro
[Build] --> src/like.rs:4:13
[Build] |
[Build] 4 | use serde::{Deserialize, Serialize};
[Build] | ^^^^^^^^^^^
[Build]

The solution is to include this Deserialize feature in Cargo.toml:
serde = { version = "1.0", features = ["derive"] }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant