From 73aaedffd84be54ccb5500066a17075c281d6d4c Mon Sep 17 00:00:00 2001 From: Chris Emerson Date: Sun, 31 Dec 2023 14:28:40 +0000 Subject: [PATCH 1/2] Update to Termion 2.0. --- Cargo.toml | 2 +- examples/html2term.rs | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index c6d65ff..0a4e631 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,4 +41,4 @@ path = "examples/html2text.rs" argparse = "0.2.2" [target.'cfg(unix)'.dev-dependencies] -termion = "1.5" +termion = "2.0" diff --git a/examples/html2term.rs b/examples/html2term.rs index 605fb95..af725da 100644 --- a/examples/html2term.rs +++ b/examples/html2term.rs @@ -18,7 +18,7 @@ mod top { use termion::event::Key; use termion::input::TermRead; use termion::raw::IntoRawMode; - use termion::screen::AlternateScreen; + use termion::screen::IntoAlternateScreen; use unicode_width::UnicodeWidthStr; fn to_style(tag: &Vec) -> String { @@ -170,7 +170,11 @@ mod top { let mut doc_x = 0; let mut doc_y = 0; - let mut screen = AlternateScreen::from(io::stdout().into_raw_mode().unwrap()); + let mut screen = io::stdout() + .into_raw_mode() + .unwrap() + .into_alternate_screen() + .unwrap(); loop { // Sanity-check the current screen position. max_y should From 503db5c32eb355ef2b38ce40e693668cbf20f502 Mon Sep 17 00:00:00 2001 From: Chris Emerson Date: Sun, 31 Dec 2023 14:29:27 +0000 Subject: [PATCH 2/2] Update for 0.9.4. --- CHANGELOG.md | 4 ++++ Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 119bbdc..f87bc37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ Possible log types: - `[fixed]` for any bug fixes. - `[security]` to invite users to upgrade in case of vulnerabilities. +### 0.9.4 + +- [changed] Updated the termion dev-dependency to 2.0. + ### 0.9.3 - [changed] Added cargo categories and update to 2021 edition. diff --git a/Cargo.toml b/Cargo.toml index 0a4e631..8c7397f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "html2text" -version = "0.9.3" +version = "0.9.4" authors = ["Chris Emerson "] description = "Render HTML as plain text." repository = "https://github.com/jugglerchris/rust-html2text/"