From 64a4cd4cf934941aba96a42513c93ef3606a921e Mon Sep 17 00:00:00 2001 From: Josh Megnauth Date: Thu, 10 Oct 2024 01:56:35 -0400 Subject: [PATCH] Fix tests and compile error for Wayland feat Also fixes a deprecation error. --- src/app.rs | 8 ++------ src/tab.rs | 2 +- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/app.rs b/src/app.rs index e18d263..3c76315 100644 --- a/src/app.rs +++ b/src/app.rs @@ -2991,7 +2991,7 @@ impl Application for App { }; let (entity, command) = self.open_tab_entity( - Location::Desktop(crate::desktop_dir(), display), + Location::Desktop(crate::desktop_dir(), display, self.config.desktop), false, None, ); @@ -4217,11 +4217,7 @@ pub(crate) mod test_utils { // New tab with items let location = Location::Path(path.to_owned()); - let items = location.scan( - DesktopConfig::default(), - Mounters::new(MounterMap::new()), - IconSizes::default(), - ); + let items = location.scan(IconSizes::default()); let mut tab = Tab::new(location, TabConfig::default()); tab.set_items(items); diff --git a/src/tab.rs b/src/tab.rs index 0675543..52218ba 100644 --- a/src/tab.rs +++ b/src/tab.rs @@ -306,7 +306,7 @@ impl Display for FormatTime { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { let date_time = chrono::DateTime::::from(self.0); let now = chrono::Local::now(); - if date_time.date() == now.date() { + if date_time.date_naive() == now.date_naive() { write!( f, "{}, {}",