Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
FlickerSoul committed Jul 4, 2024
1 parent 1984200 commit d462f1d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ impl HashTrieMapPy {
}

#[classmethod]
#[pyo3(signature = (keys, val=None))]
fn fromkeys(
_cls: &Bound<'_, PyType>,
keys: &Bound<'_, PyAny>,
Expand All @@ -224,6 +225,7 @@ impl HashTrieMapPy {
Ok(HashTrieMapPy { inner })
}

#[pyo3(signature = (key, default=None))]
fn get(&self, key: Key, default: Option<PyObject>) -> Option<PyObject> {
if let Some(value) = self.inner.get(&key) {
Python::with_gil(|py| Some(value.clone_ref(py)))
Expand Down Expand Up @@ -721,6 +723,7 @@ impl<'source> FromPyObject<'source> for HashTrieSetPy {
#[pymethods]
impl HashTrieSetPy {
#[new]
#[pyo3(signature = (value=None))]
fn init(value: Option<HashTrieSetPy>) -> Self {
if let Some(value) = value {
value
Expand Down

0 comments on commit d462f1d

Please sign in to comment.