diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-06-21 17:02:52 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-06-21 17:12:37 +0900 |
| commit | 84fe6ac6977f15cbec85cbc9f773567742a7fb87 (patch) | |
| tree | 5701e7c980585dd404471ab9fa53e98a0ba601ab /crates/shirabe/src/cache.rs | |
| parent | 12a7756588a20f1351e6976f0c009de5992514a9 (diff) | |
| download | php-shirabe-84fe6ac6977f15cbec85cbc9f773567742a7fb87.tar.gz php-shirabe-84fe6ac6977f15cbec85cbc9f773567742a7fb87.tar.zst php-shirabe-84fe6ac6977f15cbec85cbc9f773567742a7fb87.zip | |
refactor(math): use method-style max/min/clamp over std::cmp
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/cache.rs')
| -rw-r--r-- | crates/shirabe/src/cache.rs | 8 |
1 files changed, 4 insertions, 4 deletions
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()); } } |
