Skip to content

Commit

Permalink
style: fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
evenyag committed Sep 18, 2023
1 parent df4e0b9 commit b582ea4
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/mito2/src/region/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::error::{Error, JsonOptionsSnafu, Result};
/// Options that affect the entire region.
///
/// Users need to specify the options while creating/opening a region.
#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
#[derive(Debug, Default, Clone, PartialEq, Eq, Deserialize)]
#[serde(default)]
pub struct RegionOptions {
/// Region SST files TTL.
Expand All @@ -37,15 +37,6 @@ pub struct RegionOptions {
pub compaction: CompactionOptions,
}

impl Default for RegionOptions {
fn default() -> Self {
RegionOptions {
ttl: None,
compaction: CompactionOptions::default(),
}
}
}

impl TryFrom<&HashMap<String, String>> for RegionOptions {
type Error = Error;

Expand Down Expand Up @@ -107,7 +98,7 @@ impl TwcsOptions {
self.time_window.and_then(|window| {
let window_secs = window.as_secs();
if window_secs == 0 {
return None;
None
} else {
window_secs.try_into().ok()
}
Expand Down

0 comments on commit b582ea4

Please sign in to comment.