File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff 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
5858pub 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}
You can’t perform that action at this time.
0 commit comments