Skip to content

Commit 27bf90d

Browse files
committed
Undo map_err changes to avoid merge conflicts with #5
1 parent 5f9d40d commit 27bf90d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/parse_timsrust.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,13 @@ pub fn parse_precursor_info(
3535
spectrum_path: &str,
3636
) -> Result<HashMap<String, Precursor>, std::io::Error> {
3737
let reader = timsrust::readers::SpectrumReader::new(spectrum_path)
38-
.map_err(std::io::Error::other)?;
38+
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
3939

4040
let spectra = reader
4141
.get_all()
4242
.into_iter()
4343
.collect::<Result<Vec<_>, _>>()
44-
.map_err(std::io::Error::other)?;
44+
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
4545

4646
let precursor_info = spectra
4747
.into_iter()
@@ -57,13 +57,13 @@ pub fn parse_precursor_info(
5757
/// Read MS2 spectra from spectrum files with timsrust
5858
pub fn read_ms2_spectra(spectrum_path: &str) -> Result<Vec<MS2Spectrum>, std::io::Error> {
5959
let reader = timsrust::readers::SpectrumReader::new(spectrum_path)
60-
.map_err(std::io::Error::other)?;
60+
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
6161

6262
let spectra = reader
6363
.get_all()
6464
.into_iter()
6565
.collect::<Result<Vec<_>, _>>()
66-
.map_err(std::io::Error::other)?;
66+
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?;
6767

6868
Ok(spectra.into_iter().map(MS2Spectrum::from).collect())
6969
}

0 commit comments

Comments
 (0)