diff --git a/src/py_module.rs b/src/py_module.rs index fbb3129..e7bb9e5 100644 --- a/src/py_module.rs +++ b/src/py_module.rs @@ -12,9 +12,6 @@ //! A thin, typed, user-facing Python wrapper around these low-level bindings is //! provided in `harmony/__init__.py`. -// Only compile when the `python-binding` feature is enabled. -#![cfg(feature = "python-binding")] - use pyo3::prelude::*; // We need the `Python` type later on. @@ -34,8 +31,6 @@ use crate::{ load_harmony_encoding, HarmonyEncodingName, }; -use serde_json; - /// A thin PyO3 wrapper around the Rust `HarmonyEncoding` struct. #[pyclass] struct PyHarmonyEncoding { @@ -393,8 +388,7 @@ fn openai_harmony(_py: Python<'_>, m: &Bound<'_, PyModule>) -> PyResult<()> { "python" => ToolNamespaceConfig::python(), _ => { return Err(PyErr::new::(format!( - "Unknown tool namespace: {}", - tool + "Unknown tool namespace: {tool}" ))); } }; diff --git a/src/wasm_module.rs b/src/wasm_module.rs index 9ffb8fd..b1c4490 100644 --- a/src/wasm_module.rs +++ b/src/wasm_module.rs @@ -1,5 +1,3 @@ -#![cfg(feature = "wasm-binding")] - use wasm_bindgen::prelude::*; use crate::{ @@ -9,8 +7,6 @@ use crate::{ }; use serde::Deserialize; -use serde_json; -use serde_wasm_bindgen; #[wasm_bindgen] extern "C" { @@ -335,8 +331,7 @@ pub fn get_tool_namespace_config(tool: &str) -> Result { "python" => ToolNamespaceConfig::python(), _ => { return Err(JsValue::from_str(&format!( - "Unknown tool namespace: {}", - tool + "Unknown tool namespace: {tool}" ))) } };