mirror of
https://github.com/YGGverse/htcount.git
synced 2026-03-31 17:15:37 +00:00
fix match_time value update
This commit is contained in:
parent
3e520aa1ea
commit
120f8811c2
1 changed files with 2 additions and 6 deletions
|
|
@ -15,10 +15,6 @@ fn main() -> anyhow::Result<()> {
|
|||
argument::Argument::parse()
|
||||
};
|
||||
|
||||
let match_time = argument
|
||||
.match_time
|
||||
.map(|ref t| chrono::Local::now().format(t).to_string());
|
||||
|
||||
// parse some arguments once
|
||||
let is_debug_i = argument.debug.contains("i");
|
||||
let is_debug_d = argument.debug.contains("d");
|
||||
|
|
@ -41,8 +37,8 @@ fn main() -> anyhow::Result<()> {
|
|||
'l: for line in BufReader::new(File::open(&argument.source)?).lines() {
|
||||
let l = line?;
|
||||
|
||||
if let Some(ref t) = match_time {
|
||||
if !l.contains(t) {
|
||||
if let Some(ref t) = argument.match_time {
|
||||
if !l.contains(&chrono::Local::now().format(t).to_string()) {
|
||||
if is_debug_d {
|
||||
debug::info(&format!("Record time mismatch time filter {t}"))
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue