Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
wugeer committed Jun 25, 2024
1 parent b7176cf commit c707778
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::path::PathBuf;
use crate::dir_walker::Operater;
use crate::display::get_number_format;

pub static DAY_SECEONDS: i64 = 24 * 60 * 60;
pub static DAY_SECONDS: i64 = 24 * 60 * 60;

#[derive(Deserialize, Default)]
#[serde(rename_all = "kebab-case")]
Expand Down Expand Up @@ -182,11 +182,11 @@ fn get_filter_time_operator(
.parse::<i64>()
.unwrap_or_else(|_| panic!("invalid data format"))
.abs()
* DAY_SECEONDS;
* DAY_SECONDS;
match val.chars().next().expect("Value should not be empty") {
'+' => (Operater::LessThan, time - DAY_SECEONDS),
'+' => (Operater::LessThan, time - DAY_SECONDS),
'-' => (Operater::GreaterThan, time),
_ => (Operater::Equal, time - DAY_SECEONDS),
_ => (Operater::Equal, time - DAY_SECONDS),
}
}
None => (Operater::GreaterThan, 0),
Expand Down
4 changes: 2 additions & 2 deletions src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use platform::get_metadata;
use std::collections::HashSet;
use std::path::{Path, PathBuf};

use crate::config::DAY_SECEONDS;
use crate::config::DAY_SECONDS;

use crate::dir_walker::Operater;
use crate::platform;
Expand Down Expand Up @@ -68,7 +68,7 @@ pub fn is_filtered_out_due_to_regex(filter_regex: &[Regex], dir: &Path) -> bool
pub fn is_filtered_out_due_to_file_time(filter_time: &(Operater, i64), actual_time: i64) -> bool {
match filter_time {
(Operater::Equal, bound_time) => {
!(actual_time >= *bound_time && actual_time < *bound_time + DAY_SECEONDS)
!(actual_time >= *bound_time && actual_time < *bound_time + DAY_SECONDS)
}
(Operater::GreaterThan, bound_time) => actual_time < *bound_time,
(Operater::LessThan, bound_time) => actual_time > *bound_time,
Expand Down

0 comments on commit c707778

Please sign in to comment.