hecatia-elegua / bilge

Use bitsized types as if they were a feature of rust.
Apache License 2.0
171 stars 17 forks source link

implement Display on BitsError #70

Closed wooosh closed 1 year ago

wooosh commented 1 year ago

This patch rectifies BitsError not satisfying the constraints of the Error trait due to not implementing the Display trait.

hecatia-elegua commented 1 year ago

@wooosh Thank you, I completely forgot this. Should we also impl Error?

edit: will merge tomorrow, if you wanna add impl Error you can do so, otherwise I'll do that right after.

wooosh commented 1 year ago

I did not implement Error because as far as I can tell, it would prevent this package from being no-std on stable rust (https://github.com/rust-lang/rust/issues/103765).

hecatia-elegua commented 1 year ago

Ah, if it's just available in core on nightly, it would be better behind our nightly feature gate. But since:

  1. Our nightly feature gate is basically unused/blocked on upstream changes, just there to test how performant this all is at max constness
  2. nightly-gating would change a ton of files since it adds feature(error_in_core) everywhere

let's keep it at this for now.

hecatia-elegua commented 1 year ago

again, thank you @wooosh, have a good one!