Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions bindings/python/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Changed

- Update `PyO3` to `0.23.0`.

## [0.14.6] - 2024-12-27

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions bindings/python/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ crate-type = ["cdylib"]
built = { version = "0.7.1", features = ["cargo-lock", "chrono"] }

[dependencies]
pyo3 = { version = "0.22.0", features = ["extension-module", "abi3-py37"] }
pyo3-built = "0.5"
pyo3 = { version = "0.23.0", features = ["extension-module", "abi3-py37"] }
pyo3-built = "0.6"
rayon = "1"
url = "2"

Expand Down
4 changes: 2 additions & 2 deletions bindings/python/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ fn inline_many_fragments_impl(
Ok(output.map_err(InlineErrorWrapper)?)
}

#[allow(dead_code)]
#[allow(dead_code, clippy::needless_raw_string_hashes)]
mod build {
include!(concat!(env!("OUT_DIR"), "/built.rs"));
}
Expand All @@ -377,7 +377,7 @@ fn css_inline(py: Python<'_>, module: &Bound<'_, PyModule>) -> PyResult<()> {
module.add_wrapped(wrap_pyfunction!(inline_fragment))?;
module.add_wrapped(wrap_pyfunction!(inline_many))?;
module.add_wrapped(wrap_pyfunction!(inline_many_fragments))?;
let inline_error = py.get_type_bound::<InlineError>();
let inline_error = py.get_type::<InlineError>();
inline_error.setattr("__doc__", INLINE_ERROR_DOCSTRING)?;
module.add("InlineError", inline_error)?;
module.add("__build__", pyo3_built::pyo3_built!(py, build))?;
Expand Down
6 changes: 2 additions & 4 deletions css-inline/src/html/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl selectors::Element for Element<'_> {
ns_url.clone(),
local_name.clone().into_inner(),
))
.map_or(false, |value| operation.eval_str(value)),
.is_some_and(|value| operation.eval_str(value)),
}
}

Expand Down Expand Up @@ -236,9 +236,7 @@ impl selectors::Element for Element<'_> {
fn has_id(&self, id: &LocalName, case_sensitivity: CaseSensitivity) -> bool {
self.attributes()
.get(local_name!("id"))
.map_or(false, |id_attr| {
case_sensitivity.eq(id.as_bytes(), id_attr.as_bytes())
})
.is_some_and(|id_attr| case_sensitivity.eq(id.as_bytes(), id_attr.as_bytes()))
}

#[inline]
Expand Down
Loading