linting fixes
All checks were successful
cargo_test_bench / Run Tests (push) Successful in 1m19s
cargo_test_bench / Run Benchmarks (push) Successful in 1m59s

This commit is contained in:
saji 2024-08-02 18:52:27 -05:00
parent 0ec5b835d5
commit 2115a27e39
3 changed files with 6 additions and 5 deletions

View file

@ -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 pi_frame_server::dither::{DitherMethod, DitheredImage};
use pi_frame_server::eink::Palette;

View file

@ -4,21 +4,22 @@ pub mod dither;
pub mod eink;
use serde::Deserialize;
use tower_http::trace::TraceLayer;
use std::path::PathBuf;
use toml;
use crate::display::get_display;
use crate::dither::{DitherMethod, DitheredImage};
use crate::eink::Palette;
use clap::{Args, Parser, Subcommand};
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.
#[derive(Deserialize, Debug)]
struct Config {
database_path: PathBuf,
search_paths: Vec<PathBuf>,
host: String,
}
/// Display images on E-Ink Displays
@ -85,7 +86,7 @@ async fn main() -> anyhow::Result<()> {
let display = get_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?;
info!("Listening on 0.0.0.0:3000");
axum::serve(listener, app).await?;

View file

@ -1,4 +1,4 @@
POST http://192.168.0.185:3000/setimage
POST http://localhost:3000/setimage
[MultipartFormData]
image: file,{{image}};
dither_method: Atkinson