diff --git a/src/main.rs b/src/main.rs index 1cc0c79..0988876 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,27 +12,9 @@ use serde::{Deserialize, de::DeserializeSeed}; use url::Url; use walkdir::WalkDir; -const REGULAR_SET: Set = Set { - top_left: "▛", - top_right: "▜", - bottom_left: "▔", - bottom_right: "▔", - vertical_left: "▏", - vertical_right: "▕", - horizontal_top: "▔", - horizontal_bottom: "▔", -}; - -const WONKY_SET: Set = Set { - top_left: "╭", - top_right: "╮", - bottom_left: "▔", - bottom_right: "▔", - vertical_left: "║", - vertical_right: "║", - horizontal_top: "═", - horizontal_bottom: "▔", -}; +use crate::ui::{REGULAR_SET, WONKY_SET}; + +mod ui; fn deserialize_name<'de, D>(deserializer: D) -> Result, D::Error> where diff --git a/src/ui.rs b/src/ui.rs new file mode 100644 index 0000000..ecf1fc0 --- /dev/null +++ b/src/ui.rs @@ -0,0 +1,23 @@ +use ratatui::symbols::border::Set; + +pub const REGULAR_SET: Set = Set { + top_left: "▛", + top_right: "▜", + bottom_left: "▔", + bottom_right: "▔", + vertical_left: "▏", + vertical_right: "▕", + horizontal_top: "▔", + horizontal_bottom: "▔", +}; + +pub const WONKY_SET: Set = Set { + top_left: "╭", + top_right: "╮", + bottom_left: "▔", + bottom_right: "▔", + vertical_left: "║", + vertical_right: "║", + horizontal_top: "═", + horizontal_bottom: "▔", +};