Skip to content

Commit

Permalink
chore: lint: can elide lifetime for rustc 1.65
Browse files Browse the repository at this point in the history
  • Loading branch information
YeungOnion committed Dec 2, 2024
1 parent e6556eb commit 12b0119
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/distribution/dirichlet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ where
}
}

impl<'a, D> Continuous<&'a OVector<f64, D>, f64> for Dirichlet<D>
impl<D> Continuous<&OVector<f64, D>, f64> for Dirichlet<D>
where
D: Dim,
nalgebra::DefaultAllocator: nalgebra::allocator::Allocator<D>
Expand Down
2 changes: 1 addition & 1 deletion src/distribution/multinomial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ where
// }
// }

impl<'a, D> Discrete<&'a OVector<u64, D>, f64> for Multinomial<D>
impl<D> Discrete<&OVector<u64, D>, f64> for Multinomial<D>
where
D: Dim,
nalgebra::DefaultAllocator: nalgebra::allocator::Allocator<D>,
Expand Down
2 changes: 1 addition & 1 deletion src/distribution/multivariate_normal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ where
}
}

impl<'a, D> Continuous<&'a OVector<f64, D>, f64> for MultivariateNormal<D>
impl<D> Continuous<&OVector<f64, D>, f64> for MultivariateNormal<D>
where
D: Dim,
nalgebra::DefaultAllocator:
Expand Down
6 changes: 3 additions & 3 deletions src/distribution/multivariate_students_t.rs
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ where
}
}

impl<'a, D> Continuous<&'a OVector<f64, D>, f64> for MultivariateStudent<D>
impl<D> Continuous<&OVector<f64, D>, f64> for MultivariateStudent<D>
where
D: Dim + DimMin<D, Output = D>,
nalgebra::DefaultAllocator: nalgebra::allocator::Allocator<D>
Expand All @@ -348,7 +348,7 @@ where
/// - `inv(Σ)` is the precision matrix,
/// - `det(Σ)` is the determinant of the scale matrix, and
/// - `k` is the dimension of the distribution.
fn pdf(&self, x: &'a OVector<f64, D>) -> f64 {
fn pdf(&self, x: &OVector<f64, D>) -> f64 {
if self.freedom.is_infinite() {
use super::multivariate_normal::density_normalization_and_exponential;
let (pdf_const, exp_arg) = density_normalization_and_exponential(
Expand All @@ -369,7 +369,7 @@ where

/// Calculates the log probability density function for the multivariate
/// student distribution at `x`. Equivalent to pdf(x).ln().
fn ln_pdf(&self, x: &'a OVector<f64, D>) -> f64 {
fn ln_pdf(&self, x: &OVector<f64, D>) -> f64 {
if self.freedom.is_infinite() {
use super::multivariate_normal::density_normalization_and_exponential;
let (pdf_const, exp_arg) = density_normalization_and_exponential(
Expand Down

0 comments on commit 12b0119

Please sign in to comment.