`with_namespace!`: fix formatting and accept `expr` instead of `ident`

This commit is contained in:
adsick 2024-11-27 20:05:15 +02:00 committed by Maksym Pavlenko
parent 0db44b965c
commit 3044a44363
1 changed files with 1 additions and 1 deletions

View File

@ -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