Skip to content
This repository has been archived by the owner on Apr 19, 2022. It is now read-only.

std::fmt::Display not implemented #31

Closed
uzyn opened this issue Sep 22, 2017 · 7 comments · Fixed by #43
Closed

std::fmt::Display not implemented #31

uzyn opened this issue Sep 22, 2017 · 7 comments · Fixed by #43

Comments

@uzyn
Copy link

uzyn commented Sep 22, 2017

Even with the sample code provided at README.md.

It's getting the following error:

`bigint::U256` cannot be formatted with the default formatter; try using `:?` instead if you are using a format string
   |
   = help: the trait `std::fmt::Display` is not implemented for `bigint::U256`
   = note: required by `std::fmt::Display::fmt`
@NikVolf
Copy link
Contributor

NikVolf commented Sep 22, 2017

you probably use it with default-features = false?

@uzyn
Copy link
Author

uzyn commented Sep 22, 2017

This is how it looks on my Cargo.toml

bigint = "4.2.0"

How do I enable default features?

@NikVolf
Copy link
Contributor

NikVolf commented Sep 22, 2017

replace your line with

bigint = { version = "4.0", features = ["std"] }

as a workaround

we will update docs/configs

@uzyn
Copy link
Author

uzyn commented Sep 22, 2017

Thanks. That works!

@uzyn uzyn closed this as completed Sep 22, 2017
@NikVolf NikVolf reopened this Sep 22, 2017
@NikVolf
Copy link
Contributor

NikVolf commented Sep 22, 2017

will keep it open until std feature will be default

@Pzixel
Copy link
Contributor

Pzixel commented Jul 20, 2018

Hey guys.

Why does Display is not implemented for no_std environments? Why there are these artificial limitations?

Pzixel referenced this issue in openethereum/pwasm-abi Jul 20, 2018
@debris
Copy link
Contributor

debris commented Jul 20, 2018

no reason. fix should be trivial, just change feature gates and replace std::fmt::Display with core::fmt::Display. PRs are welcomed :)

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

Successfully merging a pull request may close this issue.

4 participants