fix: fix REST API and HTTP server examples

- Fix string interpolation issues: escape curly braces with \{ and \}
  since unescaped { triggers string interpolation
- Fix effectful function invocation: use "let _ = run main() with {}"
  instead of bare "main()" calls
- Use inline record types instead of type aliases (structural typing)
- Fix flake.nix to show build progress instead of suppressing output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-13 23:11:51 -05:00
parent 5edd8aea77
commit cdc4f47272
3 changed files with 64 additions and 82 deletions

View File

@@ -31,7 +31,10 @@
shellHook = ''
# Build and add lux to PATH
cargo build --release --quiet 2>/dev/null
if [ ! -f target/release/lux ] || [ Cargo.toml -nt target/release/lux ] || [ src/main.rs -nt target/release/lux ]; then
echo "Building lux..."
cargo build --release
fi
export PATH="$PWD/target/release:$PATH"
printf "\n"