Skip to content

Commit 08f521c

Browse files
authored
Merge branch 'main' into test-serialization
2 parents 2a020e9 + 8da6c5f commit 08f521c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

examples/envoy_filter_metadata/src/lib.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ impl HttpContext for MetadataHttp {
3838
self.send_http_response(
3939
200,
4040
vec![("Powered-By", "proxy-wasm"), ("uppercased-metadata", &data)],
41-
Some(
42-
format!("Custom response with Envoy metadata: {:?}\n", data).as_bytes(),
43-
),
41+
Some(format!("Custom response with Envoy metadata: {data:?}\n").as_bytes()),
4442
);
4543
Action::Pause
4644
}

src/traits.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ pub trait Context {
4242
hostcalls::set_shared_data(key, value, cas)
4343
}
4444

45+
fn remove_shared_data(&self, key: &str, cas: Option<u32>) -> Result<(), Status> {
46+
hostcalls::set_shared_data(key, None, cas)
47+
}
48+
4549
fn register_shared_queue(&self, name: &str) -> u32 {
4650
hostcalls::register_shared_queue(name).unwrap()
4751
}

0 commit comments

Comments
 (0)