Skip to main content

plot/lib/display/
path_scan.rs

1use super::Icon;
2use crate::lib::logic::{ScanPathStat, ScannedToApply}; // Zwróć uwagę, że usunąłem DrawTree, bo nie jest tu już potrzebne
3
4impl std::fmt::Display for ScanPathStat {
5	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
6		write!(
7			f,
8			"{} {} | {} {} | {} {} | {} {}",
9			Icon::ENTRY,
10			self.relation.select_dir.buf.display(),
11			Icon::FILE,
12			self.count_files,
13			Icon::FOLDER,
14			self.count_folder,
15			Icon::EMPTY,
16			self.count_empty
17		)
18	}
19}
20
21impl std::fmt::Display for ScannedToApply {
22	fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
23		// Domyślny format dla całego skanera to po prostu czytelne statystyki!
24		write!(f, "📊 Stats -> {}", self.stat)
25	}
26}