-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why require T : Num
for implementing Deserialize
for Complex<T>
#118
Comments
I think it's probably just because the implementation uses Would you like to open a PR to relax this? |
WalterSmuts
added a commit
to WalterSmuts/num-complex
that referenced
this issue
Dec 5, 2023
Sure. Thanks for having a look. |
cuviper
pushed a commit
to WalterSmuts/num-complex
that referenced
this issue
Feb 6, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Question in the title: Why require
T : Num
for implementingDeserialize
forComplex<T>
?Asking because I'm attempting to implement
Serialize
andDeserialize
for a private struct. I've got a minimal example:producing:
All probable types I'd implement is likely to implement
Num
anyway so that's not really the concern. The concern is that it would require me to add the trait bound and cause a major version change in my library (if I want to use the derive macros).The
num-complex
crate does compile and tests succeed with the bound removed, so I'm a bit confused as to why the bound was added in the first place:and
The text was updated successfully, but these errors were encountered: