jaemk / cached

Rust cache structures and easy function memoization
MIT License
1.57k stars 95 forks source link

Update to syn 2 #185

Closed omid closed 7 months ago

omid commented 8 months ago

🚧 🚧 🚧 It's a breaking change! 🚧 🚧 🚧

Because syn throws an error for keywords, we have to rename type to something else. A general pattern is to use ty instead of type.

omid commented 8 months ago

@jaemk Reminder :D

BaxHugh commented 7 months ago

Hey @omid, nice work. Looking at it, it mostly just seems like type -> ty. I like that you've made the change in places other than just the macro call for consistency.

Only thing I've noticed is that we've now got a few calls of &String.as_str() which I think are unnecessary so I've removed them in this PR https://github.com/omid/cached/pull/1 to your branch, eveything still works.

omid commented 7 months ago

Thanks a lot @BaxHugh. Just merged 🙏🏼

jaemk commented 7 months ago

Thanks @omid and @BaxHugh !

jaemk commented 7 months ago

FYI, I'm going to wait to release these changes since there's a couple more breaking changes in PR