Skip to content

Commit

Permalink
Merge pull request #269 from rust-ndarray/fix-format
Browse files Browse the repository at this point in the history
Fix minor format spec breaking of rustfmt
  • Loading branch information
termoshtt authored Mar 13, 2021
2 parents 7925aa6 + a22c836 commit 28c7860
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions ndarray-linalg/src/solve.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,8 @@ where
self.ensure_square()?;
match self.factorize() {
Ok(fac) => fac.sln_det(),
Err(LinalgError::Lapack(e)) if matches!(e, lax::error::Error::LapackComputationalFailure {..}) =>
Err(LinalgError::Lapack(e))
if matches!(e, lax::error::Error::LapackComputationalFailure { .. }) =>
{
// The determinant is zero.
Ok((A::zero(), A::Real::neg_infinity()))
Expand All @@ -487,7 +488,8 @@ where
self.ensure_square()?;
match self.factorize_into() {
Ok(fac) => fac.sln_det_into(),
Err(LinalgError::Lapack(e)) if matches!(e, lax::error::Error::LapackComputationalFailure { .. }) =>
Err(LinalgError::Lapack(e))
if matches!(e, lax::error::Error::LapackComputationalFailure { .. }) =>
{
// The determinant is zero.
Ok((A::zero(), A::Real::neg_infinity()))
Expand Down
6 changes: 4 additions & 2 deletions ndarray-linalg/src/solveh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,8 @@ where
fn sln_deth(&self) -> Result<(A::Real, A::Real)> {
match self.factorizeh() {
Ok(fac) => Ok(fac.sln_deth()),
Err(LinalgError::Lapack(e)) if matches!(e, lax::error::Error::LapackComputationalFailure {..}) =>
Err(LinalgError::Lapack(e))
if matches!(e, lax::error::Error::LapackComputationalFailure { .. }) =>
{
// Determinant is zero.
Ok((A::Real::zero(), A::Real::neg_infinity()))
Expand All @@ -451,7 +452,8 @@ where
fn sln_deth_into(self) -> Result<(A::Real, A::Real)> {
match self.factorizeh_into() {
Ok(fac) => Ok(fac.sln_deth_into()),
Err(LinalgError::Lapack(e)) if matches!(e, lax::error::Error::LapackComputationalFailure {..}) =>
Err(LinalgError::Lapack(e))
if matches!(e, lax::error::Error::LapackComputationalFailure { .. }) =>
{
// Determinant is zero.
Ok((A::Real::zero(), A::Real::neg_infinity()))
Expand Down

0 comments on commit 28c7860

Please sign in to comment.