Skip to content

Commit 341f165

Browse files
committed
Fix clippy
1 parent 1059358 commit 341f165

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ fn looks_like_cid(bytes: &[u8]) -> bool {
361361
}
362362

363363
fn encode_dag_cbor_from_pyobject<'py, W: enc::Write>(
364-
py: Python<'py>,
364+
_py: Python<'py>,
365365
obj: &Bound<'py, PyAny>,
366366
w: &mut W,
367367
) -> Result<()>
@@ -384,7 +384,7 @@ where
384384
types::Map::bounded(entries.len(), w)?;
385385
for (key, value) in &entries {
386386
(&**key).encode(w)?;
387-
encode_dag_cbor_from_pyobject(py, value, w)?;
387+
encode_dag_cbor_from_pyobject(_py, value, w)?;
388388
}
389389
return Ok(());
390390
}
@@ -394,7 +394,7 @@ where
394394
types::Array::bounded(len, w)?;
395395
for i in 0..len {
396396
let item = l.get_item_unchecked(i);
397-
encode_dag_cbor_from_pyobject(py, &item, w)?;
397+
encode_dag_cbor_from_pyobject(_py, &item, w)?;
398398
}
399399
return Ok(());
400400
}
@@ -442,15 +442,15 @@ where
442442
types::Array::bounded(len, w)?;
443443
for i in 0..len {
444444
let item = unsafe { l.get_item_unchecked(i) };
445-
encode_dag_cbor_from_pyobject(py, &item, w)?;
445+
encode_dag_cbor_from_pyobject(_py, &item, w)?;
446446
}
447447
Ok(())
448448
} else if let Ok(map) = obj.cast::<PyDict>() {
449449
let entries = collect_and_sort_map_entries(map)?;
450450
types::Map::bounded(entries.len(), w)?;
451451
for (key, value) in &entries {
452452
(&**key).encode(w)?;
453-
encode_dag_cbor_from_pyobject(py, value, w)?;
453+
encode_dag_cbor_from_pyobject(_py, value, w)?;
454454
}
455455
Ok(())
456456
} else if let Ok(s) = obj.cast::<PyString>() {

0 commit comments

Comments
 (0)