Skip to content

Commit

Permalink
fix clippy beta
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed Jan 9, 2025
1 parent 2986334 commit 1411e02
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pyo3-build-config/src/impl_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2001,7 +2001,7 @@ fn unescape(escaped: &str) -> Vec<u8> {
}
}

bytes.push(unhex(chunk[0]) << 4 | unhex(chunk[1]));
bytes.push((unhex(chunk[0]) << 4) | unhex(chunk[1]));
}

bytes
Expand Down
2 changes: 1 addition & 1 deletion pyo3-ffi/src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ pub struct PyDateTime_DateTime {
pub unsafe fn PyDateTime_GET_YEAR(o: *mut PyObject) -> c_int {
// This should work for Date or DateTime
let data = (*(o as *mut PyDateTime_Date)).data;
c_int::from(data[0]) << 8 | c_int::from(data[1])
(c_int::from(data[0]) << 8) | c_int::from(data[1])
}

#[inline]
Expand Down
2 changes: 1 addition & 1 deletion src/types/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -949,7 +949,7 @@ impl<'py> PyAnyMethods<'py> for Bound<'py, PyAny> {
}
}

inner(self.py(), self.getattr(attr_name).map_err(Into::into))
inner(self.py(), self.getattr(attr_name))
}

fn getattr<N>(&self, attr_name: N) -> PyResult<Bound<'py, PyAny>>
Expand Down
2 changes: 1 addition & 1 deletion src/types/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ impl<'py> PyModuleMethods<'py> for Bound<'py, PyModule> {
Err(err) => {
if err.is_instance_of::<exceptions::PyAttributeError>(self.py()) {
let l = PyList::empty(self.py());
self.setattr(__all__, &l).map_err(PyErr::from)?;
self.setattr(__all__, &l)?;
Ok(l)
} else {
Err(err)
Expand Down

0 comments on commit 1411e02

Please sign in to comment.