Skip to content

Commit 51a28b2

Browse files
PiotrSikoraunleashed
authored andcommitted
Cleanup examples. (PR 62)
[alex: removed cosmetic changes to examples that IMO detract from them] Signed-off-by: Piotr Sikora <[email protected]>
1 parent a5af097 commit 51a28b2

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

examples/BUILD

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,15 @@ rust_binary(
5252
"//bazel/cargo:log",
5353
],
5454
)
55+
56+
rust_binary(
57+
name = "http_config",
58+
srcs = ["http_config.rs"],
59+
crate_type = "cdylib",
60+
edition = "2018",
61+
out_binary = True,
62+
deps = [
63+
"//:proxy_wasm",
64+
"//bazel/cargo:log",
65+
],
66+
)

examples/http_headers.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ impl RootContext for HttpHeadersRoot {
3131
Some(ContextType::HttpContext)
3232
}
3333

34-
fn create_http_context(&self, _context_id: u32) -> Option<Box<dyn HttpContext>> {
35-
Some(Box::new(HttpHeaders {
36-
context_id: _context_id,
37-
}))
34+
fn create_http_context(&self, context_id: u32) -> Option<Box<dyn HttpContext>> {
35+
Some(Box::new(HttpHeaders { context_id }))
3836
}
3937
}
4038

0 commit comments

Comments
 (0)