linting fixes
This commit is contained in:
parent
0ec5b835d5
commit
2115a27e39
|
@ -1,4 +1,4 @@
|
||||||
use criterion::{black_box, criterion_group, criterion_main, BenchmarkId, Criterion};
|
use criterion::{criterion_group, criterion_main, BenchmarkId, Criterion};
|
||||||
use image::{ImageReader, RgbImage};
|
use image::{ImageReader, RgbImage};
|
||||||
use pi_frame_server::dither::{DitherMethod, DitheredImage};
|
use pi_frame_server::dither::{DitherMethod, DitheredImage};
|
||||||
use pi_frame_server::eink::Palette;
|
use pi_frame_server::eink::Palette;
|
||||||
|
|
|
@ -4,21 +4,22 @@ pub mod dither;
|
||||||
pub mod eink;
|
pub mod eink;
|
||||||
|
|
||||||
use serde::Deserialize;
|
use serde::Deserialize;
|
||||||
|
use tower_http::trace::TraceLayer;
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
use toml;
|
|
||||||
|
|
||||||
use crate::display::get_display;
|
use crate::display::get_display;
|
||||||
use crate::dither::{DitherMethod, DitheredImage};
|
use crate::dither::{DitherMethod, DitheredImage};
|
||||||
use crate::eink::Palette;
|
use crate::eink::Palette;
|
||||||
use clap::{Args, Parser, Subcommand};
|
use clap::{Args, Parser, Subcommand};
|
||||||
use image::RgbImage;
|
use image::RgbImage;
|
||||||
use tracing::{error, event, info, instrument, warn, Level};
|
use tracing::{error, info};
|
||||||
|
|
||||||
/// Application config, including sqlite db path, scan folders, and scheduling.
|
/// Application config, including sqlite db path, scan folders, and scheduling.
|
||||||
#[derive(Deserialize, Debug)]
|
#[derive(Deserialize, Debug)]
|
||||||
struct Config {
|
struct Config {
|
||||||
database_path: PathBuf,
|
database_path: PathBuf,
|
||||||
search_paths: Vec<PathBuf>,
|
search_paths: Vec<PathBuf>,
|
||||||
|
host: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Display images on E-Ink Displays
|
/// Display images on E-Ink Displays
|
||||||
|
@ -85,7 +86,7 @@ async fn main() -> anyhow::Result<()> {
|
||||||
let display = get_display();
|
let display = get_display();
|
||||||
let ctx = api::AppState::new(display);
|
let ctx = api::AppState::new(display);
|
||||||
|
|
||||||
let app = api::router().with_state(ctx);
|
let app = api::router().with_state(ctx).layer(TraceLayer::new_for_http());
|
||||||
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
|
let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await?;
|
||||||
info!("Listening on 0.0.0.0:3000");
|
info!("Listening on 0.0.0.0:3000");
|
||||||
axum::serve(listener, app).await?;
|
axum::serve(listener, app).await?;
|
||||||
|
|
Loading…
Reference in a new issue