-
Notifications
You must be signed in to change notification settings - Fork 0
Lifetime parameter in generics seems to be missing #2
Copy link
Copy link
Open
Description
Hello, thanks for your crate, but I've come across a compile error when using this crate. An example is given below:
use skippable_partialeq::SkippablePartialEq;
#[derive(Debug, SkippablePartialEq)]
#[exclude_suffix(at)]
pub struct Post<'i> {
pub id: i64,
pub content: &'i str,
pub author: i32,
pub created_at: f64,
pub updated_at: Option<f64>,
}The error is something like:
error[E0726]: implicit elided lifetime not allowed hereGenerated codes PartialEq implementation (with cargo expand):
impl PartialEq for Post {
fn eq(&self, other: &Self) -> bool {
&self.id == &other.id && &self.content == &other.content
&& &self.author == &other.author && self.updated_at.is_none()
&& other.updated_at.is_none()
|| self.updated_at.is_some() && other.updated_at.is_some()
}
}And the lifetime parameter of Post seems to be missing.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels