We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3d8cc4d commit 4b6c124Copy full SHA for 4b6c124
src/lib.rs
@@ -1,7 +1,3 @@
1
-use std::any::Any;
2
-use std::ops::Deref;
3
-
4
-use libc::{self, size_t};
5
use numpy::{PyArray1, PyArrayMethods};
6
use pyo3::prelude::*;
7
use pyo3::types::{PyByteArray, PyBytes};
@@ -64,6 +60,7 @@ fn as_array_mut<'a>(arr: &'a Bound<PyAny>) -> PyResult<&'a mut [u8]> {
64
60
Ok(arr)
65
61
}
66
62
63
+#[allow(dead_code)]
67
fn as_array<'a>(arr: &'a Bound<PyAny>) -> PyResult<&'a [u8]> {
68
let arr = unsafe {
69
if let Ok(arr) = arr.downcast::<PyByteArray>() {
0 commit comments