chore: clippy

This commit is contained in:
Elijah McMorris 2025-06-12 14:29:41 -07:00
parent 86edeab90e
commit 7b2a4d2c72
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
2 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ fn print_df(ticker: &Ticker, df: &DataFrame) {
fn csv_merge() -> Result<(), Error> {
for ticker in Ticker::iter() {
if !std::path::Path::new(&format!("./data/csv/{}", ticker)).exists() {
if !std::path::Path::new(&format!("./data/csv/{ticker}")).exists() {
continue;
}
@ -46,7 +46,7 @@ fn csv_merge() -> Result<(), Error> {
}
fn ark_plan(ticker: Ticker) -> Result<(), Error> {
println!("Starting: {:#?}", ticker);
println!("Starting: {ticker:#?}");
let sec = Duration::from_secs(rand::rng().random_range(30 * 60..=4 * 60 * 60));
// sleep(sec).await;
thread::sleep(sec);

View file

@ -110,8 +110,8 @@ impl Ark {
fn read_parquet(ticker: &Ticker, path: Option<&String>) -> Result<DF, Error> {
let df = LazyFrame::scan_parquet(
match path {
Some(p) => format!("{}/{}.parquet", p, ticker),
None => format!("data/parquet/{}.parquet", ticker),
Some(p) => format!("{p}/{ticker}.parquet"),
None => format!("data/parquet/{ticker}.parquet"),
},
ScanArgsParquet::default(),
)?;
@ -558,7 +558,7 @@ impl Ark {
pub fn merge_old_csv_to_parquet(ticker: Ticker, path: Option<String>) -> Result<Self, Error> {
let mut dfs = vec![];
for x in glob(&format!("data/csv/{}/*", ticker))?.filter_map(Result::ok) {
for x in glob(&format!("data/csv/{ticker}/*"))?.filter_map(Result::ok) {
dfs.push(LazyCsvReader::new(x).finish()?);
}