mirror of
https://codeberg.org/icewind/ptouch-api.git
synced 2026-06-03 10:54:07 +02:00
cargo updates
This commit is contained in:
parent
0631be6414
commit
1b82593cf1
3 changed files with 336 additions and 591 deletions
884
Cargo.lock
generated
884
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
18
Cargo.toml
18
Cargo.toml
|
|
@ -6,13 +6,13 @@ edition = "2024"
|
|||
[dependencies]
|
||||
ptouch-rs = { version = "0.2.0", features = ["serde"] }
|
||||
main_error = "0.1.2"
|
||||
tokio = { version = "1.47.1", features = ["macros", "rt-multi-thread", "signal"] }
|
||||
image = { version = "0.25.8", features = ["png", "jpeg", "bmp"] }
|
||||
axum = { version = "0.8.4", features = ["macros", "json"] }
|
||||
tokio = { version = "1.50.0", features = ["macros", "rt-multi-thread", "signal"] }
|
||||
image = { version = "0.25.10", features = ["png", "jpeg", "bmp"] }
|
||||
axum = { version = "0.8.8", features = ["macros", "json"] }
|
||||
listenfd = "1.0.2"
|
||||
serde = { version = "1.0.225", features = ["derive"] }
|
||||
thiserror = "2.0.16"
|
||||
toml = "0.9.6"
|
||||
clap = { version = "4.5.47", features = ["derive"] }
|
||||
tracing-subscriber = "0.3.20"
|
||||
tracing = "0.1.41"
|
||||
serde = { version = "1.0.228", features = ["derive"] }
|
||||
thiserror = "2.0.18"
|
||||
toml = "1.1.1"
|
||||
clap = { version = "4.6.0", features = ["derive"] }
|
||||
tracing-subscriber = "0.3.23"
|
||||
tracing = "0.1.44"
|
||||
|
|
|
|||
31
src/main.rs
31
src/main.rs
|
|
@ -74,26 +74,23 @@ async fn main() -> MainResult {
|
|||
match (systemd_listener.take_unix_listener(0), &config.listen) {
|
||||
(Ok(Some(listener)), _) => {
|
||||
info!("listening on fd 0");
|
||||
let listener = UnixListener::from_std(listener).unwrap();
|
||||
let listener = UnixListener::from_std(listener)?;
|
||||
axum::serve(listener, app)
|
||||
.with_graceful_shutdown(cancel)
|
||||
.await
|
||||
.unwrap();
|
||||
.await?;
|
||||
}
|
||||
(_, ListenConfig::Unix { socket: path }) => {
|
||||
if let Some(parent) = path.parent() {
|
||||
if !parent.exists() {
|
||||
create_dir_all(parent).map_err(|error| SetupError::CreateSocketParent {
|
||||
if let Some(parent) = path.parent() && !parent.exists() {
|
||||
create_dir_all(parent).map_err(|error| SetupError::CreateSocketParent {
|
||||
error,
|
||||
path: parent.into(),
|
||||
})?;
|
||||
set_permissions(parent, PermissionsExt::from_mode(0o666)).map_err(|error| {
|
||||
SetupError::SocketParentPermissions {
|
||||
error,
|
||||
path: parent.into(),
|
||||
})?;
|
||||
set_permissions(parent, PermissionsExt::from_mode(0o666)).map_err(|error| {
|
||||
SetupError::SocketParentPermissions {
|
||||
error,
|
||||
path: parent.into(),
|
||||
}
|
||||
})?;
|
||||
}
|
||||
}
|
||||
})?;
|
||||
}
|
||||
let _ = remove_file(path);
|
||||
|
||||
|
|
@ -107,8 +104,7 @@ async fn main() -> MainResult {
|
|||
|
||||
axum::serve(uds, app)
|
||||
.with_graceful_shutdown(cancel)
|
||||
.await
|
||||
.unwrap();
|
||||
.await?;
|
||||
}
|
||||
(_, ListenConfig::Tcp { address, port }) => {
|
||||
let address = SocketAddr::new(*address, *port);
|
||||
|
|
@ -118,8 +114,7 @@ async fn main() -> MainResult {
|
|||
info!("listening on {}", address);
|
||||
axum::serve(listener, app)
|
||||
.with_graceful_shutdown(cancel)
|
||||
.await
|
||||
.unwrap();
|
||||
.await?;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue