bytecodealliance/wasi-rs

Derive Debug, PartialEq, Eq on Fdstat

Closed this issue · 2 comments

Similarly to #34, it would nice for Fdstat to autoderive a couple of traits such as Debug, PartialEq, and Eq. This would lend itself nicely to asserts on Fdstat structs:

assert_eq!(fdstat1, fdstat2, "should be equal);

Also, it seems that Fdstat in the previous version of wasi did implement those traits which may be considered a regression for any user of this crate migrating from 0.7 to 0.9.

Debug is good. Eq/PartialEq -- fdstat isn't problematic in the way filestat is, but I'd still be curious how normal code might use these, other than tests.

Similarly to #34, I suggest we initially add Debug which seems fundamental, and Eq and PartialEq can be left out for now until we get more reports from the users.