Skip to content

Commit

Permalink
style: fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
mmalenic committed Nov 29, 2024
1 parent 83545c6 commit 383f825
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion htsget-config/src/config/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub enum Parser<'a> {
Path(&'a Path),
}

impl<'a> Parser<'a> {
impl Parser<'_> {
/// Deserialize a string or path into a config value using Figment.
#[instrument]
pub fn deserialize_config_into<T>(&self) -> io::Result<T>
Expand Down
4 changes: 2 additions & 2 deletions htsget-config/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,12 @@ pub struct Interval {
impl Interval {
/// Check if this interval contains the value.
pub fn contains(&self, value: u32) -> bool {
return match (self.start.as_ref(), self.end.as_ref()) {
match (self.start.as_ref(), self.end.as_ref()) {
(None, None) => true,
(None, Some(end)) => value < *end,
(Some(start), None) => value >= *start,
(Some(start), Some(end)) => value >= *start && value < *end,
};
}
}

/// Convert this interval into a one-based noodles `Interval`.
Expand Down

0 comments on commit 383f825

Please sign in to comment.