Skip to content

Commit

Permalink
Fix error in including files using the macro
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonbaeten committed Jan 14, 2025
1 parent 712c8d1 commit 891e319
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ exclude = ["example"]
resolver = "2"

[workspace.package]
version = "1.0.0-beta.2"
version = "1.0.0-beta.3"
edition = "2021"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/tweedegolf/memory-serve"
description = "Fast static file serving for axum web applications"
publish = true

[workspace.dependencies]
memory-serve-core = { path = "./memory-serve-core", version = "1.0.0-beta.2" }
memory-serve-macros = { path = "./memory-serve-macros", version = "1.0.0-beta.2" }
memory-serve-core = { path = "./memory-serve-core", version = "1.0.0-beta.3" }
memory-serve-macros = { path = "./memory-serve-macros", version = "1.0.0-beta.3" }
4 changes: 2 additions & 2 deletions example/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ edition = "2021"

[dependencies]
memory-serve = { path = "../memory-serve" }
axum = "0.7"
axum = "0.8"
tokio = { version = "1.0", features = ["full"] }
tracing-subscriber = "0.3"
tracing = "0.1"
tracing = "0.1"
2 changes: 1 addition & 1 deletion memory-serve-core/src/code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ pub fn assets_to_code(
std::fs::write(&file_path, compressed_bytes)
.expect("Unable to write file to out dir.");

format!("Some(include_bytes!(r\"{}\"))", path.to_string_lossy())
format!("Some(include_bytes!(r\"{}\"))", file_path.to_string_lossy())
}
} else {
format!("Some(include_bytes!(r\"{}\"))", path.to_string_lossy())
Expand Down
2 changes: 1 addition & 1 deletion memory-serve/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ fn main() {
}
}

// deternmine wheter to dynamically load assets or embed them in the binary
// determine whether to dynamically load assets or embed them in the binary
let force_embed = std::env::var("CARGO_FEATURE_FORCE_EMBED").unwrap_or_default();
let embed = !cfg!(debug_assertions) || force_embed == "1";

Expand Down

0 comments on commit 891e319

Please sign in to comment.