Skip to content

Commit

Permalink
chore: Regular upgrade (#28)
Browse files Browse the repository at this point in the history
* chore: regular upgrade

* chore: remove hyper from deps
  • Loading branch information
henry40408 authored Nov 19, 2023
1 parent 3b695fa commit 4620195
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 33 deletions.
74 changes: 48 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "comics"
version = "2.2.0"
version = "2.2.1"
edition = "2021"
authors = ["henry40408 <[email protected]>"]
description = "Simple file server for comic books"
Expand All @@ -15,7 +15,6 @@ bcrypt = "0.15.0"
blake3 = "1.5.0"
chrono = "0.4.31"
clap = { version = "4.4.3", features = ["derive", "env"] }
hyper = "0.14.27"
image = { version = "0.24.7", default-features = false, features = [
"png",
"jpeg",
Expand Down
8 changes: 3 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
use askama::Template;
use axum::{
extract::{Path, State},
http::{header, Request},
http::{header, Request, StatusCode},
middleware::{self, Next},
response::{Html, IntoResponse, Redirect},
routing::{get, post},
Expand All @@ -85,7 +85,6 @@ use axum::{
use base64::{engine::GeneralPurpose, Engine};
use chrono::{Duration, Utc};
use clap::{Parser, Subcommand};
use hyper::StatusCode;
use rand::{seq::SliceRandom, thread_rng};
use serde::{Deserialize, Serialize};
use std::{
Expand Down Expand Up @@ -163,8 +162,6 @@ pub enum MyError {
NotImage(PathBuf),
#[error("password mismatched")]
PasswordMismatched,
#[error("server error: {0}")]
ServerError(#[from] hyper::Error),
#[error("failed to strip prefix")]
StripPrefixError(#[from] path::StripPrefixError),
}
Expand Down Expand Up @@ -680,7 +677,8 @@ pub async fn run_server(addr: SocketAddr, cli: &Cli) -> MyResult<()> {
info!("running on {addr}");
axum::Server::bind(&addr)
.serve(app.into_make_service())
.await?;
.await
.expect("failed to start the server");
Ok(())
}

Expand Down

0 comments on commit 4620195

Please sign in to comment.