Skip to content

Commit

Permalink
feat: use serde_bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
piotrpdev committed Jan 4, 2025
1 parent c67b9ee commit 2d29ddd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions backend/Cargo.lock

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

1 change: 1 addition & 0 deletions backend/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ opencv = { workspace = true }
tokio-util = { version = "0.7.12", features = ["rt"] }
axum-embed = "0.1.0"
rust-embed = "8.5.0"
serde_bytes = "0.11.15"

[dev-dependencies]
playwright = { version = "0.0.20", default-features = false, features = ["rt-tokio"] }
Expand Down
1 change: 1 addition & 0 deletions backend/src/web/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ struct EmbeddedAssets;
pub struct ImageContainer {
pub camera_id: i64,
pub timestamp: i64,
#[serde(with = "serde_bytes")]
pub image_bytes: Vec<u8>,
}

Expand Down

0 comments on commit 2d29ddd

Please sign in to comment.