use super::DrawTree;
use crate::lib::logic::{AnchoredPathsDatum, PathNode};
impl std::fmt::Display for PathNode {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(f, "{}", self.str)
}
}
impl std::fmt::Display for AnchoredPathsDatum {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
let mut lines = Vec::new();
lines.push("🅰️ 📍 execut_dir (CWD)".to_string());
lines.push(format!("{} buf: {}", DrawTree::ENTRY_BRANCH, self.execut_dir.buf.display()));
lines.push(format!("{} str: {}", DrawTree::ENTRY_TERMINAL, self.execut_dir.str));
lines.push("🅱️ 🎯 select_dir (TARGET)".to_string());
lines.push(format!("{} buf: {}", DrawTree::ENTRY_BRANCH, self.select_dir.buf.display()));
lines.push(format!("{} str: {}", DrawTree::ENTRY_TERMINAL, self.select_dir.str));
lines.push("🆎🔗 relat_path (RELATIVE, BETWEEN CWD & TARGET)".to_string());
lines.push(format!("{} str: {}", DrawTree::ENTRY_TERMINAL, self.relat_path));
write!(f, "{}", lines.join("\n"))
}
}