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-external-packages/src/symfony/console/helper/table.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-external-packages/src/symfony/console/helper/table.rs')
| -rw-r--r-- | crates/shirabe-external-packages/src/symfony/console/helper/table.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/shirabe-external-packages/src/symfony/console/helper/table.rs b/crates/shirabe-external-packages/src/symfony/console/helper/table.rs index 678831a..9c868c4 100644 --- a/crates/shirabe-external-packages/src/symfony/console/helper/table.rs +++ b/crates/shirabe-external-packages/src/symfony/console/helper/table.rs @@ -558,7 +558,7 @@ impl Table { ); } - let title_start = shirabe_php_shim::intdiv(markup_length - title_length, 2); + let title_start = (markup_length - title_length) / 2; if shirabe_php_shim::mb_detect_encoding(&markup, None, true).is_none() { markup = shirabe_php_shim::substr_replace( &markup, @@ -1087,9 +1087,8 @@ impl Table { if text_length > 0 { let content_columns = shirabe_php_shim::mb_str_split( &text_content, - shirabe_php_shim::ceil( - text_length as f64 / Self::cell_colspan(&cell) as f64, - ) as i64, + (text_length as f64 / Self::cell_colspan(&cell) as f64).ceil() + as i64, ); for (position, content) in content_columns.into_iter().enumerate() { Self::vec_set( |
