remove unused dependencies (#66)
remove some unused dependencies, and make some feature-bound
This commit is contained in:
commit
e9bc79cfcd
3 changed files with 7 additions and 15 deletions
8
Cargo.lock
generated
8
Cargo.lock
generated
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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 = "*"
|
||||
|
|
@ -29,7 +27,7 @@ tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
|||
default = ["text", "binary"]
|
||||
# contains all the parsers
|
||||
all = ["text", "binary"]
|
||||
text = []
|
||||
text = ["dep:atoi_radix10"]
|
||||
binary = []
|
||||
|
||||
[dev-dependencies]
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@ use std::{
|
|||
time::Duration,
|
||||
};
|
||||
|
||||
use chrono::Local;
|
||||
use flurry::{
|
||||
config::{
|
||||
GRID_LENGTH, HOST, IMAGE_SAVE_INTERVAL, JPEG_UPDATE_INTERVAL, STDOUT_STATISTICS_INTERVAL,
|
||||
|
|
@ -41,13 +40,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())?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue