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.execution_dir.buf.display()));
lines.push(format!("{} str: {}", DrawTree::ENTRY_TERMINAL, self.execution_dir.str));
lines.push("🅱️ 🎯 select_dir (TARGET)".to_string());
lines.push(format!("{} buf: {}", DrawTree::ENTRY_BRANCH, self.workspace_dir.buf.display()));
lines.push(format!("{} str: {}", DrawTree::ENTRY_TERMINAL, self.workspace_dir.str));
lines.push("🆎🔗 relat_path (RELATIVE, BETWEEN CWD & TARGET)".to_string());
lines.push(format!("{} str: {}", DrawTree::ENTRY_TERMINAL, self.to_relative_path()));
write!(f, "{}", lines.join("\n"))
}
}