Merge pull request #3616 from youknowone/fix-ci

Fix CI
This commit is contained in:
Jeong YunWon authored and GitHub committed 2022-04-15 20:50:45 +09:00
commit 28eff1d56d
3 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -220,8 +220,8 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
toolchain: nightly
components: rustfmt, clippy
override: true
- name: run rustfmt
uses: actions-rs/cargo@v1
+1 -1
View File
@@ -154,7 +154,7 @@ mod zlib {
fn header_from_wbits(wbits: OptionalArg<i8>, vm: &VirtualMachine) -> PyResult<InitOptions> {
let wbits = wbits.unwrap_or(MAX_WBITS as i8);
let header = wbits > 0;
let wbits = wbits.abs() as u8;
let wbits = wbits.unsigned_abs();
match wbits {
9..=15 => Ok(InitOptions::Standard {
header,
+3 -3
View File
@@ -599,8 +599,8 @@ fn try_update_quantity_from_tuple<'a, I: Iterator<Item = &'a PyObjectRef>>(
Some(CFormatQuantity::FromValuesTuple) => match elements.next() {
Some(width_obj) => {
if let Some(i) = width_obj.payload::<PyInt>() {
let i = i.try_to_primitive::<i32>(vm)?.abs() as usize;
*q = Some(CFormatQuantity::Amount(i));
let i = i.try_to_primitive::<i32>(vm)?.unsigned_abs();
*q = Some(CFormatQuantity::Amount(i as usize));
Ok(())
} else {
Err(vm.new_type_error("* wants int".to_owned()))
@@ -953,7 +953,7 @@ where
break;
}
}
return Ok(Some(CFormatQuantity::Amount(num.abs() as usize)));
return Ok(Some(CFormatQuantity::Amount(num.unsigned_abs() as usize)));
}
}
Ok(None)