slight adjustments, remove some explicit annotations
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
9cc4f3e929
commit
f0a0704a93
8 changed files with 14 additions and 21 deletions
|
@ -394,21 +394,15 @@ impl Service {
|
|||
u64::from(original_width) * u64::from(height) / u64::from(original_height)
|
||||
};
|
||||
if use_width {
|
||||
if intermediate <= u64::from(std::u32::MAX) {
|
||||
if intermediate <= u64::from(u32::MAX) {
|
||||
(width, intermediate as u32)
|
||||
} else {
|
||||
(
|
||||
(u64::from(width) * u64::from(std::u32::MAX) / intermediate) as u32,
|
||||
std::u32::MAX,
|
||||
)
|
||||
((u64::from(width) * u64::from(u32::MAX) / intermediate) as u32, u32::MAX)
|
||||
}
|
||||
} else if intermediate <= u64::from(std::u32::MAX) {
|
||||
} else if intermediate <= u64::from(u32::MAX) {
|
||||
(intermediate as u32, height)
|
||||
} else {
|
||||
(
|
||||
std::u32::MAX,
|
||||
(u64::from(height) * u64::from(std::u32::MAX) / intermediate) as u32,
|
||||
)
|
||||
(u32::MAX, (u64::from(height) * u64::from(u32::MAX) / intermediate) as u32)
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue