From 39a251a60dd4e0c6e6e75769078c727f8d27a2c6 Mon Sep 17 00:00:00 2001 From: Caleb Smith Date: Tue, 2 Jul 2024 16:24:08 -0500 Subject: [PATCH] Fix Windows stuff --- src/logger.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/logger.rs b/src/logger.rs index 64e186f..9bf6628 100644 --- a/src/logger.rs +++ b/src/logger.rs @@ -1,7 +1,6 @@ use std::{ fmt::Write, ops::Deref, - os::unix::fs::MetadataExt, path::{Path, PathBuf}, sync::Arc, }; @@ -58,7 +57,7 @@ impl Logger { pub fn set_file(&self, mut file: PathBuf) { if file .metadata() - .map(|m| m.size() > 1_048_576) + .map(|m| m.len() > 1_048_576) .unwrap_or_default() { let file_num = file