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

add forgotten use std::ascii::AsciiExt; #5

Merged
merged 1 commit into from
Feb 17, 2018

Conversation

symphorien
Copy link
Contributor

If I compile master, I get:

error[E0599]: no method named `eq_ignore_ascii_case` found for type `&str` in the current scope
  --> /home/symphorien/.cargo/registry/src/github.com-1ecc6299db9ec823/which-1.0.4/src/lib.rs:37:24
   |
37 |             .map(|e| e.eq_ignore_ascii_case(env::consts::EXE_EXTENSION)) {
   |                        ^^^^^^^^^^^^^^^^^^^^
   |
   = help: items from traits can only be used if the trait is in scope
   = note: the following trait is implemented but not in scope, perhaps add a `use` for it:
           candidate #1: `use std::ascii::AsciiExt;`

error: aborting due to previous error

error: Could not compile `which`.

Using the tip of the compiler, here is a fix :)
Tests still pass.
Please release a new version on crates.io after merging :)

@harryfei harryfei merged commit a6ea157 into harryfei:master Feb 17, 2018
@harryfei
Copy link
Owner

Sorry for that and thanks for this PR. I have merged it and pulblished a new version in crates.io (which @ 1.0.5).
I sudden remove this line because the compile warning it as unused. After I dig into this bug, I found the root cause.
The use std::ascii::AsciiExt line is not needed on the latest Rust versoin. However when we remove it, the older version of Rust will build failed. Finally, I merge this pull request and add #[allow(unused)] to bypass it.

FWIW, more detail in rust-lang/rust#46510.

@symphorien
Copy link
Contributor Author

thanks a lot !

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.

2 participants