Skip to content

Commit

Permalink
Fixed warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
tbetcke committed Jan 11, 2025
1 parent d880e15 commit 45784e1
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 18 deletions.
6 changes: 3 additions & 3 deletions src/operator/interface/distributed_array_vector_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ impl<'a, C: Communicator, Item: RlstScalar + Equivalence> LinearSpace
}
}

impl<'a, C: Communicator, Item: RlstScalar + Equivalence> InnerProductSpace
for DistributedArrayVectorSpace<'a, C, Item>
impl<C: Communicator, Item: RlstScalar + Equivalence> InnerProductSpace
for DistributedArrayVectorSpace<'_, C, Item>
{
fn inner(&self, x: &Self::E, other: &Self::E) -> Self::F {
x.view().inner(other.view())
Expand Down Expand Up @@ -130,7 +130,7 @@ impl<'a, C: Communicator, Item: RlstScalar + Equivalence> Element
}
}

impl<'a, C: Communicator, Item: RlstScalar + Equivalence> Clone
impl<C: Communicator, Item: RlstScalar + Equivalence> Clone
for DistributedArrayVectorSpaceElement<'_, C, Item>
{
fn clone(&self) -> Self {
Expand Down
9 changes: 4 additions & 5 deletions src/operator/interface/distributed_sparse_operator.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Distributed sparse operator
use std::rc::Rc;

use bempp_distributed_tools::IndexLayout;
use mpi::traits::{Communicator, Equivalence};

use crate::dense::traits::Shape;
Expand All @@ -23,8 +22,8 @@ pub struct DistributedCsrMatrixOperatorImpl<'a, Item: RlstScalar + Equivalence,
range: Rc<DistributedArrayVectorSpace<'a, C, Item>>,
}

impl<'a, Item: RlstScalar + Equivalence, C: Communicator> std::fmt::Debug
for DistributedCsrMatrixOperatorImpl<'a, Item, C>
impl<Item: RlstScalar + Equivalence, C: Communicator> std::fmt::Debug
for DistributedCsrMatrixOperatorImpl<'_, Item, C>
{
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("DistributedCsrMatrixOperator")
Expand Down Expand Up @@ -79,8 +78,8 @@ impl<'a, Item: RlstScalar + Equivalence, C: Communicator> OperatorBase
}
}

impl<'a, Item: RlstScalar + Equivalence, C: Communicator> AsApply
for DistributedCsrMatrixOperatorImpl<'a, Item, C>
impl<Item: RlstScalar + Equivalence, C: Communicator> AsApply
for DistributedCsrMatrixOperatorImpl<'_, Item, C>
{
fn apply_extended(
&self,
Expand Down
8 changes: 3 additions & 5 deletions src/operator/space/frame.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! A frame is a collection of elements of a space.
use std::marker::PhantomData;

use crate::operator::Element;

/// A frame is a collection of elements of a space.
Expand Down Expand Up @@ -48,20 +46,20 @@ pub struct VectorFrame<Elem: Element> {
data: Vec<Elem>,
}

impl<'a, Elem: Element> VectorFrame<Elem> {
impl<Elem: Element> VectorFrame<Elem> {
/// Create a new vector frame
pub fn new() -> Self {
Self { data: Vec::new() }
}
}

impl<'a, Elem: Element> Default for VectorFrame<Elem> {
impl<Elem: Element> Default for VectorFrame<Elem> {
fn default() -> Self {
Self::new()
}
}

impl<'a, Elem: Element> Frame for VectorFrame<Elem> {
impl<Elem: Element> Frame for VectorFrame<Elem> {
type E = Elem;

type Iter<'iter>
Expand Down
1 change: 0 additions & 1 deletion src/sparse/distributed_vector.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
//! An Indexable Vector is a container whose elements can be 1d indexed.
use std::cell::{Ref, RefCell, RefMut};
use std::ops::Index;
use std::rc::Rc;

use bempp_distributed_tools::IndexLayout;
Expand Down
3 changes: 1 addition & 2 deletions src/sparse/sparse_mat/distributed_csr_mat.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! Definition of CSR matrices.
use std::collections::HashMap;
use std::ops::Index;
use std::rc::Rc;

use crate::sparse::sparse_mat::csr_mat::CsrMatrix;
Expand Down Expand Up @@ -437,7 +436,7 @@ impl<'a, T: RlstScalar + Equivalence, C: Communicator> DistributedCsrMatrix<'a,
}
}

impl<'a, T: RlstScalar + Equivalence, C: Communicator> Shape<2> for DistributedCsrMatrix<'a, T, C> {
impl<T: RlstScalar + Equivalence, C: Communicator> Shape<2> for DistributedCsrMatrix<'_, T, C> {
fn shape(&self) -> [usize; 2] {
[
self.range_layout().number_of_global_indices(),
Expand Down
2 changes: 0 additions & 2 deletions tests/operator.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
//! Tests for the operator interface
use std::rc::Rc;

use num::traits::{One, Zero};
use rand::Rng;
use rlst::{operator::Operator, prelude::*};
Expand Down

0 comments on commit 45784e1

Please sign in to comment.