Comments (4)
Can you point me to a specific place and I'll sleuth further?
from parity-common.
Sorry for jumping in.
I tried to run cargo test
on current master branch (bbe809d
) and could not. After that I fixed one failing test:
diff --git a/fixed-hash/src/hash.rs b/fixed-hash/src/hash.rs
index da7bdc7..c8aa06a 100644
--- a/fixed-hash/src/hash.rs
+++ b/fixed-hash/src/hash.rs
@@ -677,6 +677,7 @@ mod tests {
assert!(r == u)
}
+ #[cfg(feature = "uint_conversions")]
#[test]
#[should_panic]
fn converting_differently_sized_types_panics() {
@@ -684,4 +685,4 @@ mod tests {
impl_hash_uint_conversions!(H256, U512);
}
-}
\ No newline at end of file
+}
After that I tests can run again, but as @debris stated there are a lot of errors, e.g in fixed-hash
:
Compiling fixed-hash v0.2.3 (file:///Users/kavu/Work/parity-common/fixed-hash)
error[E0277]: the trait bound `hash::tests::H160: core::convert::From<&str>` is not satisfied
--> fixed-hash/src/hash.rs:640:66
|
640 | let address: H160 = "ef2d6d194084c2de36e0dabfce45d046b37d1106".into();
| ^^^^ the trait `core::convert::From<&str>` is not implemented for `hash::tests::H160`
|
= help: the following implementations were found:
<hash::tests::H160 as core::convert::From<&'a [u8]>>
<hash::tests::H160 as core::convert::From<[u8; 20]>>
<hash::tests::H160 as core::convert::From<hash::tests::H256>>
<hash::tests::H160 as core::convert::From<u64>>
= note: required because of the requirements on the impl of `core::convert::Into<hash::tests::H160>` for `&str`
error[E0599]: no function or associated item named `from_str` found for type `hash::tests::H128` in the current scope
--> fixed-hash/src/hash.rs:650:46
|
28 | pub struct $from (pub [u8; $size]);
| ----------------------------------- function or associated item `from_str` not found for this
...
650 | assert_eq!(H128::from(0x1234567890abcdef), H128::from_str("00000000000000001234567890abcdef").unwrap());
| ^^^^^^^^^^^^^^ function or associated item not found in `hash::tests::H128`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `from_str`, perhaps you need to implement it:
candidate #1: `core::str::FromStr`
Or uint
:
error[E0277]: `uint::U256` doesn't implement `std::fmt::Debug`
--> uint/tests/uint_tests.rs:826:2
|
826 | assert_eq!(U256([0, 0, 0, u64::max_value()]), result);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `uint::U256` cannot be formatted using `{:?}` because it doesn't implement `std::fmt::Debug`
|
= help: the trait `std::fmt::Debug` is not implemented for `uint::U256`
= note: required because of the requirements on the impl of `std::fmt::Debug` for `&uint::U256`
= note: required by `std::fmt::Debug::fmt`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error[E0277]: the trait bound `uint::U256: std::convert::From<&str>` is not satisfied
--> uint/tests/uint_tests.rs:828:84
|
828 | let x1: U256 = "0000000000000000000000000000000000000000000000000000012365124623".into();
| ^^^^ the trait `std::convert::From<&str>` is not implemented for `uint::U256`
|
= help: the following implementations were found:
<uint::U256 as std::convert::From<[u8; 32]>>
<uint::U256 as std::convert::From<u32>>
<uint::U256 as std::convert::From<u64>>
<uint::U256 as std::convert::From<usize>>
and 10 others
= note: required because of the requirements on the impl of `std::convert::Into<uint::U256>` for `&str`
Hope that helps!
from parity-common.
@kavu you need to run the fixed-hash
tests like so: cargo test --features=std,heapsizeof,uint_conversions
(see .travis.yml
for the uint
tests).
That said, I noticed the missing #[cfg(feature = "uint_conversions")]
too. Will fix.
UPDATE: what @debris is referring to is most probably something else than the tests here, likely he's compiling code that uses different versions of ethereum-types
.
from parity-common.
UPDATE: what @debris is referring to is most probably something else than the tests here, likely he's compiling code that uses different versions of ethereum-types.
Yes, this were just different versions. Closing now
from parity-common.
Related Issues (20)
- U256 type does not support `num_traits::int::PrimInt` HOT 3
- Could we have a new crates release for primitive-types please? HOT 1
- [rlp] `RlpIterator::len()` does not update when the iterator is consumed. HOT 1
- From<i64> impl is invalid HOT 2
- ethereum-types: Consider depending on uint v0.9.4 or above
- rlp: handling extra data HOT 1
- rlp: list length and contents are not validated
- Where is patricia-trie? HOT 1
- Implement BoundedVec with bound on both end HOT 2
- Implement `Serialize / Deserialize` for `BoundedBtreeSet` HOT 3
- Implement BoundedVec::try_with_capacity
- Is it possible to use unit in no_std projects? HOT 1
- Is there a corresponding library in Go for Rust's primitive-types package? HOT 1
- num-traits feature on primitive-types could use a FromPrimitive impl
- [uint] conversion between uint types HOT 2
- rlp - test failures on 32-bit HOT 1
- Missing I256 HOT 2
- fixed-hash: allow opting out `rand` when `std` enabled
- uint bench doesn't compile anymore?
- Default RocksDB WAL log size settings
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from parity-common.