Skip to content

Commit

Permalink
Bump MSRV to 1.80.0 in CI and fix some clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SombkeMaximilian committed Feb 20, 2025
1 parent 34fd56b commit d966d85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ env:
RUSTUP_WINDOWS_PATH_ADD_BIN: 1
rust_stable: stable
rust_nightly: nightly
rust_min: "1.78"
rust_min: "1.80"

defaults:
run:
Expand Down
1 change: 1 addition & 0 deletions metabodecon/src/spectrum/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ pub enum Kind {
/// - NMR SPECTRUM data type
/// - XYDATA, XYPOINTS, and NTUPLES data classes
/// - Internal and external referencing methods
///
/// If you have a file that you believe should be parsable but is not, open
/// an [issue] and provide the file.
///
Expand Down
13 changes: 5 additions & 8 deletions metabodecon/src/spectrum/formats/jcampdx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ impl JcampDx {
"^13C" => Nucleus::Carbon13,
"^15N" => Nucleus::Nitrogen15,
"^19F" => Nucleus::Fluorine19,
"^29Si" => Nucleus::Silicon29,
"^29SI" => Nucleus::Silicon29,
"^31P" => Nucleus::Phosphorus31,
name => Nucleus::Other(name.to_string()),
};
Expand Down Expand Up @@ -240,10 +240,8 @@ impl JcampDx {

if let Some(shift) = shift {
Some(ReferenceCompound::new(shift, name, None, None))
} else if let Some(name) = name {
Some(ReferenceCompound::new(0.0, Some(name), None, None))
} else {
None
name.map(|name| ReferenceCompound::new(0.0, Some(name), None, None))
}
}
};
Expand Down Expand Up @@ -416,10 +414,9 @@ mod tests {
Nucleus::Carbon13 => (),
_ => panic!("Expected Carbon13"),
};
match header.reference_compound {
Some(_) => panic!("Expected None"),
None => (),
};
if header.reference_compound.is_some() {
panic!("Expected None");
}
}

#[test]
Expand Down

0 comments on commit d966d85

Please sign in to comment.