automatic cargo CI changes

This commit is contained in:
Gitea CI 2024-01-16 15:12:03 +00:00
parent 5b8753c45d
commit 747c3e6eac
5 changed files with 12 additions and 10 deletions

View File

@ -21,8 +21,6 @@ use libpt::log::*;
use clap::Parser; use clap::Parser;
use clap_verbosity_flag::{InfoLevel, Verbosity}; use clap_verbosity_flag::{InfoLevel, Verbosity};
use std::path::PathBuf;
//// TYPES ///////////////////////////////////////////////////////////////////////////////////////// //// TYPES /////////////////////////////////////////////////////////////////////////////////////////
//// CONSTANTS ///////////////////////////////////////////////////////////////////////////////////// //// CONSTANTS /////////////////////////////////////////////////////////////////////////////////////

View File

@ -20,8 +20,7 @@ use clap_verbosity_flag::{InfoLevel, Verbosity};
use std::{ use std::{
fs::File, fs::File,
io::{BufRead, BufReader, IsTerminal, Read}, io::{BufRead, BufReader, IsTerminal},
path::PathBuf,
}; };
//// TYPES ///////////////////////////////////////////////////////////////////////////////////////// //// TYPES /////////////////////////////////////////////////////////////////////////////////////////

View File

@ -21,8 +21,6 @@ use clap::Parser;
pub mod args; pub mod args;
use args::*; use args::*;
use std::path::PathBuf;
//// CONSTANTS ///////////////////////////////////////////////////////////////////////////////////// //// CONSTANTS /////////////////////////////////////////////////////////////////////////////////////
#[allow(dead_code)] #[allow(dead_code)]
//// STATICS /////////////////////////////////////////////////////////////////////////////////////// //// STATICS ///////////////////////////////////////////////////////////////////////////////////////

View File

@ -6,8 +6,8 @@
//! This crate is currently empty. //! This crate is currently empty.
use anyhow::{bail, Result}; use anyhow::{bail, Result};
use std::io::{prelude::*, BufReader};
use libpt_log::error; use libpt_log::error;
use std::io::{prelude::*, BufReader};
const BYTES_PER_LINE: usize = 16; const BYTES_PER_LINE: usize = 16;
const LINE_SEP_HORIZ: char = '─'; const LINE_SEP_HORIZ: char = '─';

View File

@ -19,8 +19,9 @@
//// IMPORTS /////////////////////////////////////////////////////////////////////////////////////// //// IMPORTS ///////////////////////////////////////////////////////////////////////////////////////
use std::{ use std::{
fmt, fmt,
ops::Deref,
path::PathBuf, path::PathBuf,
sync::atomic::{AtomicBool, Ordering}, ops::Deref, sync::atomic::{AtomicBool, Ordering},
}; };
pub mod error; pub mod error;
@ -32,7 +33,10 @@ use tracing_appender::{
non_blocking::{NonBlocking, WorkerGuard}, non_blocking::{NonBlocking, WorkerGuard},
}; };
use tracing_subscriber::{ use tracing_subscriber::{
fmt::{format::FmtSpan, time::{self, FormatTime}}, fmt::{
format::FmtSpan,
time::{self, FormatTime},
},
prelude::*, prelude::*,
}; };
@ -176,7 +180,10 @@ impl Logger {
tracing::subscriber::set_global_default(subscriber)?; tracing::subscriber::set_global_default(subscriber)?;
} }
(true, true, false, true) => { (true, true, false, true) => {
let subscriber = subscriber.with_writer(new_file_appender(log_dir)).with_timer(time::uptime()).finish(); let subscriber = subscriber
.with_writer(new_file_appender(log_dir))
.with_timer(time::uptime())
.finish();
tracing::subscriber::set_global_default(subscriber)?; tracing::subscriber::set_global_default(subscriber)?;
} }
(true, true, false, false) => { (true, true, false, false) => {