Skip to content
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

Expand Number functionality (minor breaking change) #31

Open
danlehmann opened this issue Jul 14, 2023 · 1 comment
Open

Expand Number functionality (minor breaking change) #31

danlehmann opened this issue Jul 14, 2023 · 1 comment

Comments

@danlehmann
Copy link
Owner

Number currently puts few restrictions on the underlying type:

pub trait Number: Sized {
    type UnderlyingType: Debug
        + From<u8>
        + TryFrom<u16>
        + TryFrom<u32>
        + TryFrom<u64>
        + TryFrom<u128>;
  ..
}

But maybe it should do more: Number could require that UnderlyingType supports Add, Sub etc so that it itself can do that, too. That would make it possible to calculate with Numbers.

@dzmitry-lahoda
Copy link
Contributor

is it used anywhere? if not, no need.

and, e.g. one will impl log or pow, he can just restrict UT as needed in place.

so just suggestion to close item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants