Remove generic test impl

In preparation for moving the `CompactTarget` to `primitives` remove the
generic `Into` impl and explicitly implement for just the `From` impls
that the `pow` unit tests use.

Test code only.
This commit is contained in:
Tobin C. Harding 2024-07-16 09:00:34 +10:00
parent 3d85ee3a02
commit 244d7dbe6c
No known key found for this signature in database
GPG Key ID: 40BF9E4C269D6607
1 changed files with 6 additions and 2 deletions

View File

@ -1099,8 +1099,12 @@ impl kani::Arbitrary for U256 {
mod tests { mod tests {
use super::*; use super::*;
impl<T: Into<u128>> From<T> for Target { impl From<u64> for Target {
fn from(x: T) -> Self { Self(U256::from(x)) } fn from(x: u64) -> Self { Self(U256::from(x)) }
}
impl From<u32> for Target {
fn from(x: u32) -> Self { Self(U256::from(x)) }
} }
impl<T: Into<u128>> From<T> for Work { impl<T: Into<u128>> From<T> for Work {