You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello there, here is just a personal suggestion to keep the consistency between declaring a empty struct / marker trait, nothings really important but anyway ^^
structEmpty;// okstructEmpty{}// oktraitSignedInteger;// currently not ok traitSignedInteger{}// okimplSignedIntegerfori8;// currently not okimplSignedIntegerfori8{}// ok
Also, sometime implementing the same maker trait for multiples types can be helpful (instead of using macro) :
implSignedIntegerfori8,i16,i32,i64,isize;// currently not okimplSignedIntegerfori8,i16,i32,i64,isize{}// currently not ok
The text was updated successfully, but these errors were encountered:
consistency between declaring a empty struct / marker trait
struct Empty; and struct Empty {} are not equivalent. The former also allows you to create an instance like let x = Empty; which is not possible for the latter.
So there is no "consistency", and it is not an applicable rationale here.
Hello there, here is just a personal suggestion to keep the consistency between declaring a empty struct / marker trait, nothings really important but anyway ^^
Also, sometime implementing the same maker trait for multiples types can be helpful (instead of using macro) :
The text was updated successfully, but these errors were encountered: