Skip to content

Commit

Permalink
polish
Browse files Browse the repository at this point in the history
  • Loading branch information
deepu105 committed Oct 23, 2023
1 parent a18d43e commit abd5f62
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 25 deletions.
49 changes: 36 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions src/app/models.rs
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,8 @@ impl Scrollable for ScrollableTxt {
#[cfg(test)]
mod tests {

use crate::app::RouteId;

use super::*;
use crate::app::RouteId;

#[test]
fn test_stateful_table() {
Expand Down
2 changes: 1 addition & 1 deletion src/handlers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,10 +255,10 @@ fn inverse_dir(up: bool, is_mouse: bool) -> bool {

#[cfg(test)]
mod tests {
use crate::app::{models::ScrollableTxt, Route};
use crossterm::event::{KeyCode, KeyModifiers};

use super::*;
use crate::app::{models::ScrollableTxt, Route};

#[test]
fn test_inverse_dir() {
Expand Down
6 changes: 3 additions & 3 deletions src/ui/decoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,16 +130,16 @@ fn draw_payload_block<B: Backend>(f: &mut Frame<'_, B>, app: &App, area: Rect) {

#[cfg(test)]
mod tests {
use crate::ui::utils::{COLOR_CYAN, COLOR_WHITE, COLOR_YELLOW};

use super::*;
use ratatui::{
backend::TestBackend,
prelude::Buffer,
style::{Modifier, Style},
Terminal,
};

use super::*;
use crate::ui::utils::{COLOR_CYAN, COLOR_WHITE, COLOR_YELLOW};

#[test]
fn test_draw_decoder() {
let mut app = App::new(
Expand Down
12 changes: 6 additions & 6 deletions src/ui/encoder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,19 +137,19 @@ fn render_text_area_widget<B: Backend>(

#[cfg(test)]
mod tests {
use crate::{
app::RouteId,
ui::utils::{COLOR_CYAN, COLOR_WHITE, COLOR_YELLOW},
};

use super::*;
use ratatui::{
backend::TestBackend,
prelude::Buffer,
style::{Modifier, Style},
Terminal,
};

use super::*;
use crate::{
app::RouteId,
ui::utils::{COLOR_CYAN, COLOR_WHITE, COLOR_YELLOW},
};

#[test]
fn test_draw_encoder() {
let mut app = App::new(250, None, "secret".into());
Expand Down

0 comments on commit abd5f62

Please sign in to comment.