Skip to content

Commit bed45ff

Browse files
committed
1 parent 1eea517 commit bed45ff

File tree

7 files changed

+3
-12
lines changed

7 files changed

+3
-12
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,6 @@ float_cmp = "allow" # 12
663663
items_after_statements = "allow" # 11
664664
return_self_not_must_use = "allow" # 8
665665
needless_continue = "allow" # 6
666-
inline_always = "allow" # 6
667666
fn_params_excessive_bools = "allow" # 6
668667
used_underscore_items = "allow" # 2
669668
should_panic_without_expect = "allow" # 2

src/uu/mknod/src/mknod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ mod options {
2626
pub const CONTEXT: &str = "context";
2727
}
2828

29-
#[inline(always)]
3029
fn makedev(maj: u64, min: u64) -> dev_t {
3130
// pick up from <sys/sysmacros.h>
3231
((min & 0xff) | ((maj & 0xfff) << 8) | ((min & !0xff) << 12) | ((maj & !0xfff) << 32)) as dev_t

src/uu/more/src/more.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,6 @@ fn setup_term() -> UResult<OutputType> {
380380
}
381381

382382
#[cfg(target_os = "fuchsia")]
383-
#[inline(always)]
384383
fn setup_term() -> UResult<OutputType> {
385384
// no real stdout/tty on Fuchsia, just write into a pipe
386385
Ok(OutputType::Pipe(Box::new(stdout())))
@@ -400,7 +399,6 @@ fn reset_term() -> UResult<()> {
400399
}
401400

402401
#[cfg(target_os = "fuchsia")]
403-
#[inline(always)]
404402
fn reset_term() -> UResult<()> {
405403
Ok(())
406404
}

src/uu/sort/src/numeric_str_cmp.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ pub fn human_numeric_str_cmp(
223223

224224
/// Compare two numbers as strings without parsing them as a number first. This should be more performant and can handle numbers more precisely.
225225
/// [`NumInfo`] is needed to provide a fast path for most numbers.
226-
#[inline(always)]
227226
pub fn numeric_str_cmp((a, a_info): (&[u8], &NumInfo), (b, b_info): (&[u8], &NumInfo)) -> Ordering {
228227
// check for a difference in the sign
229228
if a_info.sign != b_info.sign {

src/uu/sort/src/sort.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2100,7 +2100,6 @@ pub enum GeneralBigDecimalParseResult {
21002100

21012101
/// Parse the beginning string into a [`GeneralBigDecimalParseResult`].
21022102
/// Using a [`GeneralBigDecimalParseResult`] instead of [`ExtendedBigDecimal`] is necessary to correctly order floats.
2103-
#[inline(always)]
21042103
fn general_bd_parse(a: &[u8]) -> GeneralBigDecimalParseResult {
21052104
// The string should be valid ASCII to be parsed.
21062105
let Ok(a) = std::str::from_utf8(a) else {

src/uucore/src/lib/features/parser/num_parser.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ fn pow_with_context(bd: &BigDecimal, exp: i64, ctx: &Context) -> BigDecimal {
433433
// in exp, and the number of times we can divide exp by 2.
434434
let mut n = exp.unsigned_abs();
435435
// Note: 63 - n.leading_zeros() == n.ilog2, but that's only available in recent Rust versions.
436-
let muls = (n.count_ones() + (63 - n.leading_zeros()) - 1) as u64;
436+
let muls = (n.count_ones() + n.ilog2() - 1) as u64;
437437
// Note: div_ceil would be nice to use here, but only available in recent Rust versions.
438438
// (see note above about minimum Rust version in use)
439439
let margin_extra = (muls + MUL_PER_MARGIN_EXTRA / 2) / MUL_PER_MARGIN_EXTRA;

src/uucore/src/lib/features/uptime.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -501,8 +501,7 @@ mod tests {
501501
// (This is just a sanity check)
502502
assert!(
503503
uptime < 365 * 86400,
504-
"Uptime seems unreasonably high: {} seconds",
505-
uptime
504+
"Uptime seems unreasonably high: {uptime} seconds"
506505
);
507506
}
508507

@@ -518,9 +517,7 @@ mod tests {
518517
let diff = (uptime1 - uptime2).abs();
519518
assert!(
520519
diff <= 1,
521-
"Consecutive uptime calls should be consistent, got {} and {}",
522-
uptime1,
523-
uptime2
520+
"Consecutive uptime calls should be consistent, got {uptime1} and {uptime2}"
524521
);
525522
}
526523
}

0 commit comments

Comments
 (0)