mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 03:27:44 +00:00
commit
ed42652803
3 changed files with 6 additions and 3 deletions
|
@ -163,6 +163,7 @@ pub fn factor(mut n: u64) -> Factors {
|
|||
|
||||
let (factors, n) = table::factor(n, factors);
|
||||
|
||||
#[allow(clippy::let_and_return)]
|
||||
let r = if n < (1 << 32) {
|
||||
_factor::<Montgomery<u32>>(n, factors)
|
||||
} else {
|
||||
|
@ -280,6 +281,6 @@ impl std::ops::BitXor<Exponent> for Factors {
|
|||
}
|
||||
|
||||
debug_assert_eq!(r.product(), self.product().pow(rhs.into()));
|
||||
return r;
|
||||
r
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1413,11 +1413,11 @@ fn get_block_size(md: &Metadata, config: &Config) -> u64 {
|
|||
{
|
||||
// hard-coded for now - enabling setting this remains a TODO
|
||||
let ls_block_size = 1024;
|
||||
return match config.size_format {
|
||||
match config.size_format {
|
||||
SizeFormat::Binary => md.blocks() * 512,
|
||||
SizeFormat::Decimal => md.blocks() * 512,
|
||||
SizeFormat::Bytes => md.blocks() * 512 / ls_block_size,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(not(unix))]
|
||||
|
|
|
@ -121,6 +121,8 @@ impl Parser {
|
|||
/// Test if the next token in the stream is a BOOLOP (-a or -o), without
|
||||
/// removing the token from the stream.
|
||||
fn peek_is_boolop(&mut self) -> bool {
|
||||
// TODO: change to `matches!(self.peek(), Symbol::BoolOp(_))` once MSRV is 1.42
|
||||
// #[allow(clippy::match_like_matches_macro)] // needs MSRV 1.43
|
||||
if let Symbol::BoolOp(_) = self.peek() {
|
||||
true
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue