remove unused dependencies

This commit is contained in:
Noa Aarts 2024-12-11 12:33:07 +01:00
parent 4a230a08c2
commit 7c46b8062c
Signed by: noa
GPG key ID: 1850932741EFF672
3 changed files with 7 additions and 15 deletions

8
Cargo.lock generated
View file

@ -563,12 +563,6 @@ version = "2.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2"
[[package]]
name = "debug_print"
version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8f215f9b7224f49fb73256115331f677d868b34d18b65dbe4db392e6021eea90"
[[package]]
name = "digest"
version = "0.10.7"
@ -662,9 +656,7 @@ dependencies = [
"bytes",
"chrono",
"criterion",
"debug_print",
"futures",
"futures-util",
"headers",
"image",
"rand",

View file

@ -5,15 +5,13 @@ edition = "2021"
[dependencies]
async-trait = "0.1.83"
atoi_radix10 = "0.0.1"
atoi_radix10 = { version = "0.0.1", optional = true }
axum = { version = "0.7.7", features = ["ws"] }
axum-extra = { version = "0.9.4", features = ["typed-header"] }
axum-streams = "0.19.0"
bytes = "1.6.0"
chrono = "0.4.38"
debug_print = "1.0.0"
futures = "0.3.31"
futures-util = { version = "0.3.31", features = ["sink", "std"] }
headers = "0.4.0"
image = "0.25.2"
rand = "*"
@ -27,7 +25,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
[features]
default = ["text", "binary"]
text = []
text = ["dep:atoi_radix10"]
binary = []
[dev-dependencies]

View file

@ -7,7 +7,6 @@ use std::{
time::Duration,
};
use chrono::Local;
use flurry::{
config::{GRID_LENGTH, HOST, IMAGE_SAVE_INTERVAL, JPEG_UPDATE_INTERVAL},
flutclient::{FlutClient, ParserTypes},
@ -39,13 +38,16 @@ async fn save_image_frames(
grids: Arc<[grid::Flut<u32>; GRID_LENGTH]>,
duration: Duration,
) -> AsyncResult<Never> {
let base_dir = Path::new("./recordings");
let mut timer = interval(duration);
let base_dir = Path::new("./recordings");
create_dir_all(base_dir)?;
loop {
timer.tick().await;
for grid in grids.as_ref() {
let p = base_dir.join(format!("{}", Local::now().format("%Y-%m-%d_%H-%M-%S.jpg")));
let p = base_dir.join(format!(
"{}",
chrono::Local::now().format("%Y-%m-%d_%H-%M-%S.jpg")
));
let mut file_writer = File::create(p)?;
file_writer.write_all(&grid.read_jpg_buffer())?;