Skip to content

Commit

Permalink
fix: async thermo import in doc-only mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mobiusklein committed Jan 20, 2025
1 parent 037dc57 commit 44ec270
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/io/infer_format/dispatch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,11 @@ mod async_impl {
use crate::io::{
mgf::AsyncMGFReaderType,
mzml::AsyncMzMLReaderType,
thermo::AsyncThermoRawReaderType,
traits::{AsyncMZFileReader, AsyncRandomAccessSpectrumIterator, AsyncSpectrumSource}};

#[cfg(feature = "thermo")]
use crate::io::thermo::AsyncThermoRawReaderType;

#[non_exhaustive]
pub enum AsyncMZReaderType<
R: AsyncRead + AsyncSeek + Unpin + Send,
Expand Down
2 changes: 1 addition & 1 deletion src/io/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ pub mod thermo;
#[cfg(any(feature = "thermo", feature="doc-only"))]
pub use thermo::ThermoRawReader;

#[cfg(feature = "async_partial")]
#[cfg(all(feature = "async_partial", any(feature = "thermo", feature="doc-only")))]
pub use thermo::AsyncThermoRawReader;

#[cfg(feature = "async_partial")]
Expand Down
8 changes: 8 additions & 0 deletions src/meta/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@ impl FileMetadataConfig {
}
}

impl<T> From<&T> for FileMetadataConfig where T: MSDataFileMetadata {
fn from(value: &T) -> Self {
let mut this = Self::default();
this.copy_metadata_from(value);
this
}
}

impl MSDataFileMetadata for FileMetadataConfig {
crate::impl_metadata_trait!();

Expand Down

0 comments on commit 44ec270

Please sign in to comment.