Skip to content

Commit

Permalink
FEAT: Made spectrum readers Sendable
Browse files Browse the repository at this point in the history
  • Loading branch information
sander-willems-bruker committed Sep 2, 2024
1 parent 4903056 commit f54971a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/io/readers/precursor_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ impl PrecursorReaderBuilder {
}
}

trait PrecursorReaderTrait: Sync {
trait PrecursorReaderTrait: Sync + Send {
fn get(&self, index: usize) -> Option<Precursor>;
fn len(&self) -> usize;
}
Expand Down
4 changes: 2 additions & 2 deletions src/io/readers/spectrum_reader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ impl SpectrumReader {
spectra
}

pub fn calibrate(&mut self) {
fn calibrate(&mut self) {
self.spectrum_reader.calibrate();
}
}
Expand Down Expand Up @@ -116,7 +116,7 @@ impl SpectrumReaderBuilder {
}
}

trait SpectrumReaderTrait: Sync {
trait SpectrumReaderTrait: Sync + Send {
fn get(&self, index: usize) -> Result<Spectrum, SpectrumReaderError>;
fn get_path(&self) -> PathBuf;
fn len(&self) -> usize;
Expand Down
2 changes: 1 addition & 1 deletion src/io/readers/spectrum_reader/tdf/raw_spectra.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ impl RawSpectrumReader {
}
}

pub trait RawSpectrumReaderTrait: Sync {
pub trait RawSpectrumReaderTrait: Sync + Send {
fn get(&self, index: usize) -> Result<RawSpectrum, RawSpectrumReaderError>;
fn len(&self) -> usize;
}
Expand Down

0 comments on commit f54971a

Please sign in to comment.