Skip to content

Add missing self import and replace deprecated method#410

Merged
kaleidawave merged 3 commits intobrendanzab:masterfrom
20jasper:patch-1
Feb 28, 2026
Merged

Add missing self import and replace deprecated method#410
kaleidawave merged 3 commits intobrendanzab:masterfrom
20jasper:patch-1

Conversation

@20jasper
Copy link
Copy Markdown
Contributor

When setting up the readme example, I found that term::emit was deprecated and there was a missing import

I went with emit_to_write_style since that was used in the example folder, but let me know if there is a better option!

When setting up the readme example, I found that `term::emit` was deprecated and there was a missing import

I went with `emit_to_write_style` since that was used in the example folder, but let me know if there is a better option!
@20jasper 20jasper changed the title Add missing self import and update deprecated method Add missing self import and replace deprecated method Nov 12, 2025
@kaleidawave
Copy link
Copy Markdown
Collaborator

kaleidawave commented Nov 19, 2025

Thanks, I had not realised it was wrong!

I know there is a way to test those sort of examples in the README by #[include_str("../README.md")], so will investigate an addition to this PR before merging.

@kaleidawave kaleidawave added the bug Something isn't working label Nov 19, 2025
@kaleidawave
Copy link
Copy Markdown
Collaborator

Apologies that it has taken me a while to get round to this. Have added #![cfg_attr(feature = "termcolor", doc = include_str!("../../README.md"))] so that examples in the top level README are checked, so this mismatch should not occur again.

Thanks for spotting the initial issue and correcting the README!

@kaleidawave kaleidawave merged commit b563293 into brendanzab:master Feb 28, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants