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

fix usage of wildcard import #165

Merged
merged 1 commit into from
Feb 26, 2024
Merged

Conversation

aidantomcy
Copy link
Contributor

In the following code in the readme,

 extern crate colored; // not needed in Rust 2018+

    use colored::*;

    // test the example with `cargo run --example most_simple`
    fn main() {
        // TADAA!
        println!("{} {} !", "it".green(), "works".blue().bold());
    }

there is a wildcard import. Wouldn't it be better to use just colored::Colorize instead?

Running clippy with the following flags:
cargo clippy --workspace --all-targets --all-features -- -D warnings - W clippy::pedantic
gives an error and suggests using colored::Colorize instead. I hope this pr is fine.

@kurtlawrence kurtlawrence merged commit 775ec9f into colored-rs:master Feb 26, 2024
14 checks passed
@aidantomcy aidantomcy deleted the readme branch February 27, 2024 01:45
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