From ba32c59ef3f1d2160e16ec60f2fae0692562bd5c Mon Sep 17 00:00:00 2001 From: Luke Street Date: Fri, 17 Oct 2025 15:18:40 -0600 Subject: [PATCH] Version 2.1.0 --- Cargo.toml | 6 +++--- src/lib.rs | 10 +++------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 4f71cee..64a65c8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lzokay" -version = "2.0.1" +version = "2.1.0" edition = "2021" license = "MIT" repository = "https://github.com/encounter/lzokay-rs" @@ -18,9 +18,9 @@ alloc = ["zerocopy/alloc"] std = ["alloc", "zerocopy/std"] decompress = [] compress = [] -python = ["pyo3/extension-module", "compress", "decompress", "std"] +python = ["pyo3", "compress", "decompress", "std"] default = ["compress", "decompress", "std"] [dependencies] zerocopy = { version = "0.8.27", default-features = false, features = ["derive"] } -pyo3 = { version = "0.26.0", features = ["extension-module", "abi3-py310", "generate-import-lib"], optional = true } +pyo3 = { version = "0.26.0", features = ["abi3-py310", "extension-module", "generate-import-lib"], optional = true } diff --git a/src/lib.rs b/src/lib.rs index 626d868..fcf8291 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -69,7 +69,7 @@ pub enum Error { } impl Error { - /// Returns the error message as a string slice. + /// Returns the error message as a string. pub const fn as_str(self) -> &'static str { match self { Error::LookbehindOverrun => "lookbehind overrun", @@ -82,9 +82,7 @@ impl Error { } impl core::fmt::Display for Error { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - write!(f, "{}", self.as_str()) - } + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.write_str(self.as_str()) } } impl core::error::Error for Error {} @@ -126,6 +124,4 @@ use pyo3::prelude::*; #[cfg(feature = "python")] #[pymodule(gil_used = false)] -fn lzokay(m: &Bound<'_, PyModule>) -> PyResult<()> { - python::lzokay(m) -} +fn lzokay(m: &Bound<'_, PyModule>) -> PyResult<()> { python::lzokay(m) }