We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I've found error when compiling bat with rustc 1.28.0-nightly:
rustc 1.28.0-nightly
error[E0283]: type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>` --> src/features.rs:50:43 | 50 | print!("{}", Green.paint(word.as_ref())); | ^^^^^^ error: aborting due to previous error
that seems because of changes in type inference on nightly and beta (others found similar problems).
IMHO, that is because of there are two possibilities for type of word.as_ref(): &str and &[u8] ; this can be "fixed" using slice notation, like that:
word.as_ref()
&str
&[u8]
print!("{}", Green.paint(&word[..]));
which will compile on both stable and nightly.
The text was updated successfully, but these errors were encountered:
Thank you for taking the time to report this!
Sorry, something went wrong.
Many thanks!!! I can make a PR if you don't mind.
Sounds great!
Closed via #153
No branches or pull requests
I've found error when compiling bat with
rustc 1.28.0-nightly
:that seems because of changes in type inference on nightly and beta (others found similar problems).
IMHO, that is because of there are two possibilities for type of
word.as_ref()
:&str
and&[u8]
; this can be "fixed" using slice notation, like that:which will compile on both stable and nightly.
The text was updated successfully, but these errors were encountered: