From 84fe6ac6977f15cbec85cbc9f773567742a7fb87 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 21 Jun 2026 17:02:52 +0900 Subject: refactor(math): use method-style max/min/clamp over std::cmp Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/src/cache.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/shirabe/src/cache.rs') diff --git a/crates/shirabe/src/cache.rs b/crates/shirabe/src/cache.rs index 315ba2c..8d9473a 100644 --- a/crates/shirabe/src/cache.rs +++ b/crates/shirabe/src/cache.rs @@ -7,9 +7,9 @@ use chrono::Utc; use shirabe_external_packages::composer::pcre::{CaptureKey, Preg}; use shirabe_external_packages::symfony::finder::Finder; use shirabe_php_shim::{ - ErrorException, abs, bin2hex, clearstatcache, date_format_to_strftime, dirname, - disk_free_space, file_exists, file_get_contents, file_put_contents, filemtime, function_exists, - hash_file, is_dir, is_writable, mkdir, random_bytes, random_int, rename, time, unlink, + ErrorException, bin2hex, clearstatcache, date_format_to_strftime, dirname, disk_free_space, + file_exists, file_get_contents, file_put_contents, filemtime, function_exists, hash_file, + is_dir, is_writable, mkdir, random_bytes, random_int, rename, time, unlink, }; use crate::io::IOInterface; @@ -308,7 +308,7 @@ impl Cache { if file_exists(&full_path) && let Some(mtime) = filemtime(&full_path) { - return Some(abs(time() - mtime)); + return Some((time() - mtime).abs()); } } -- cgit v1.3.1