ozgunozerk / state-shift

Macros for implementing Type-State-Pattern on your structs and methods
MIT License
205 stars 3 forks source link

🐞 [Bug]: fn type definitions/lifetimes are lost #17

Open jkneer opened 4 hours ago

jkneer commented 4 hours ago

What happened?

#[require(Initial)]
fn foo<'bar, T> (&'bar self, obj: T) -> Result<()> {
}

The custom lifetime and T will be lost.

Expected behavior

No response

jkneer commented 4 hours ago

Hang on, that may be because it was a function that returned a Result instead of "Self"?