Skip to content

Instantly share code, notes, and snippets.

@maciektr
Created October 11, 2023 08:02
Show Gist options
  • Save maciektr/4d1c9d5689e715d205c71daeb369b852 to your computer and use it in GitHub Desktop.
Save maciektr/4d1c9d5689e715d205c71daeb369b852 to your computer and use it in GitHub Desktop.
error[E0308]: mismatched types
--> scarb/src/core/lockfile.rs:41:53
|
41 | #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Serialize, Deserialize)]
| ^^^^^^^^^ expected `SourceId`, found `&SourceId`
...
47 | #[serde(skip_serializing_if = "SourceId::is_path")]
| ------------------- arguments to this function are incorrect
|
note: method defined here
--> scarb/src/core/source/id.rs:235:12
|
235 | pub fn is_path(self) -> bool {
| ^^^^^^^ ----
= note: this error originates in the derive macro `Serialize` (in Nightly builds, run with -Z macro-backtrace for more info)
help: consider using clone here
|
41 | #[derive(Debug, Eq, PartialEq, Ord, PartialOrd, Serialize.clone(), Deserialize)]
| ++++++++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment