From 5fc007b295230730bb2b67d3db32fb7defcac6a3 Mon Sep 17 00:00:00 2001 From: Wisha Wa Date: Tue, 6 Apr 2021 13:40:14 +0000 Subject: [PATCH] ptx: remove a hack that was added in attempt to mimick GNU ptx --- src/uu/ptx/src/ptx.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/uu/ptx/src/ptx.rs b/src/uu/ptx/src/ptx.rs index 65e310576..6d30d471b 100644 --- a/src/uu/ptx/src/ptx.rs +++ b/src/uu/ptx/src/ptx.rs @@ -414,11 +414,7 @@ fn get_output_chunks( // end = begin + max length let tail_end = cmp::min(all_after.len(), tail_beg + max_tail_size) as usize; // in case that falls in the middle of a word, trim away the word. - let tail_end = trim_broken_word_right( - all_after, - tail_beg, - cmp::max(tail_end as isize - 1, tail_beg as isize) as usize, - ); + let tail_end = trim_broken_word_right(all_after, tail_beg, tail_end); // trim away whitespace again. let (tail_beg, tail_end) = trim_idx(all_after, tail_beg, tail_end);