From 23d0ec05c614376b1461a8334b2f88e872a3c305 Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Mon, 5 Aug 2024 17:25:57 -0700 Subject: [PATCH] chore(deps): use ratatui::crossterm instead of importing crossterm Alternative to: https://github.com/shuoli84/tui-menu/pull/15 --- Cargo.toml | 1 - examples/basic.rs | 15 +++++++++------ examples/nested_group.rs | 10 +++++----- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8517ecf..c8b9232 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,4 +14,3 @@ ratatui = "0.27.0" [dev-dependencies] color-eyre = "0.6.3" -crossterm = "0.27.0" diff --git a/examples/basic.rs b/examples/basic.rs index d5d2162..07634ef 100644 --- a/examples/basic.rs +++ b/examples/basic.rs @@ -1,11 +1,14 @@ use color_eyre::config::HookBuilder; -use crossterm::{ - event::{self, Event, KeyCode}, - execute, - terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, -}; use ratatui::{ - prelude::*, + crossterm::{ + event::{self, Event, KeyCode}, + execute, + terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, + }, + prelude::{ + Backend, Buffer, Constraint, CrosstermBackend, Layout, Rect, StatefulWidget, Stylize, + Terminal, Widget, + }, widgets::{Block, Paragraph}, }; use std::io::{self, stdout, Stdout}; diff --git a/examples/nested_group.rs b/examples/nested_group.rs index 39e594d..f6a980d 100644 --- a/examples/nested_group.rs +++ b/examples/nested_group.rs @@ -1,10 +1,10 @@ use color_eyre::config::HookBuilder; -use crossterm::{ - event::{self, Event, KeyCode}, - execute, - terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, -}; use ratatui::{ + crossterm::{ + event::{self, Event, KeyCode}, + execute, + terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen}, + }, prelude::*, widgets::{Block, Paragraph}, };