Skip to content

Commit

Permalink
Remove dead code found by new clippy lint
Browse files Browse the repository at this point in the history
  • Loading branch information
robamler committed May 5, 2024
1 parent 34152c9 commit 7a031d5
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions src/pybindings/stream/model/internals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ where
trait ParameterExtract<'source, Target: numpy::Element + 'source> {
type Extracted: pyo3::FromPyObject<'source> + 'source;
fn cast(param: &Self::Extracted) -> PyResult<Cow<'_, PyReadonlyArray1<'_, Target>>>;
fn len(param: &'source PyAny) -> PyResult<usize>;
}

struct ParameterExtractor<Target>(PhantomData<Target>);
Expand All @@ -163,10 +162,6 @@ impl<'source> ParameterExtract<'source, i32> for ParameterExtractor<i32> {
fn cast(param: &Self::Extracted) -> PyResult<Cow<'_, PyReadonlyArray1<'_, i32>>> {
Ok(Cow::Borrowed(param))
}

fn len(param: &'source PyAny) -> PyResult<usize> {
Ok(param.extract::<Self::Extracted>()?.len())
}
}

impl<'source> ParameterExtract<'source, f64> for ParameterExtractor<f64> {
Expand All @@ -175,10 +170,6 @@ impl<'source> ParameterExtract<'source, f64> for ParameterExtractor<f64> {
fn cast(param: &Self::Extracted) -> PyResult<Cow<'_, PyReadonlyArray1<'_, f64>>> {
param.cast_f64()
}

fn len(param: &'source PyAny) -> PyResult<usize> {
Ok(param.extract::<Self::Extracted>()?.len())
}
}

macro_rules! impl_model_for_parameterizable_model {
Expand Down

0 comments on commit 7a031d5

Please sign in to comment.