Skip to content

Commit

Permalink
update pyo3 version and Rust edition
Browse files Browse the repository at this point in the history
  • Loading branch information
jstucke committed Aug 9, 2024
1 parent 5753b3a commit fc24270
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "entropython"
version = "1.1.0"
authors = ["Enkelmann <[email protected]>"]
edition = "2018"
edition = "2021"
description = "A Python module for efficient calculation of Shannon byte entropy based on Rust."
readme = "README.md"
homepage = "https://github.com/fkie-cad/entropython"
Expand All @@ -17,4 +17,4 @@ path = "rust/lib.rs"
crate-type = ["cdylib"]

[dependencies]
pyo3 = { version = "0.17.1", features = ["extension-module"] }
pyo3 = { version = "0.22.2", features = ["extension-module"] }
2 changes: 1 addition & 1 deletion rust/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ fn metric_entropy(bytes: &[u8]) -> f64 {
/// This module implements functions to compute the Shannon byte entropy of a byte array.
/// The computation itself is implemented in Rust for faster runtime.
#[pymodule]
fn libentropython(_py: Python, m: &PyModule) -> PyResult<()> {
fn libentropython(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(shannon_entropy, m)?)?;
m.add_function(wrap_pyfunction!(metric_entropy, m)?)?;
Ok(())
Expand Down

0 comments on commit fc24270

Please sign in to comment.