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

compilation fix for no-std #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michalkucharczyk
Copy link
Contributor

This PR fixes following compilation problem for no-std environments:

error[E0412]: cannot find type `Vec` in this scope
   --> /home/miszka/parity/10-genesis-config/rust-bip39-release/src/lib.rs:110:26
    |
110 |     pub fn to_vec(&self) -> Vec<Language> {
    |                             ^^^ not found in this scope

error[E0599]: no method named `to_string` found for struct `Decompositions` in the current scope
    --> /home/miszka/parity/10-genesis-config/rust-bip39-release/src/lib.rs:201:42
     |
201  |             *cow = Cow::Owned(cow.as_ref().nfkd().to_string());
     |                                                   ^^^^^^^^^ method not found in `Decompositions<Chars<'_>>`

The problem can be reproduced with the following steps:

cargo new rust-bip39-dep-problem2
pushd rust-bip39-dep-problem2
cargo add bip39 --git "https://github.com/rust-bitcoin/rust-bip39"  --rev b100bf3 --no-default-features --features alloc
cargo build

@michalkucharczyk michalkucharczyk mentioned this pull request Apr 5, 2024
@michalkucharczyk
Copy link
Contributor Author

cc: @tcharding

Would be nice to add this check to CI somehow. Do you have any idea how to do it?
Maybe we could create a cargo new somewhere in tmp directory?

src/lib.rs Outdated Show resolved Hide resolved
Co-authored-by: Tobin C. Harding <[email protected]>
Copy link
Member

@tcharding tcharding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 8653fb2

@zhang-wenchao
Copy link

Can you merge this?

@tcharding
Copy link
Member

Would be nice to add this check to CI somehow. Do you have any idea how to do it?

Saw this comment because PR turned up in my notifications. Dunno if this is just as stale comment but there is a check for this in CI ATM on master.

@tcharding
Copy link
Member

Can you merge this?

cc @stevenroose

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

Successfully merging this pull request may close these issues.

3 participants