From 3044a4436371a1135e021e1e1cd189476dd04b10 Mon Sep 17 00:00:00 2001 From: adsick Date: Wed, 27 Nov 2024 20:05:15 +0200 Subject: [PATCH] `with_namespace!`: fix formatting and accept `expr` instead of `ident` --- crates/client/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 89f3a80..0c626b6 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -121,7 +121,7 @@ pub async fn connect( /// To use this macro, the `tonic::Request` is needed. #[macro_export] macro_rules! with_namespace { - ($req : ident, $ns: expr) => {{ + ($req:expr, $ns:expr) => {{ let mut req = Request::new($req); let md = req.metadata_mut(); // https://github.com/containerd/containerd/blob/main/pkg/namespaces/grpc.go#L27