From c13d3793b22dd225fa668d7e9cec19f481a73a95 Mon Sep 17 00:00:00 2001 From: glorv Date: Fri, 15 Apr 2022 18:19:44 +0800 Subject: [PATCH] implement Clone for ResourceQuota (#568) Signed-off-by: glorv --- src/quota.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/quota.rs b/src/quota.rs index 78913126a..7ef296da3 100644 --- a/src/quota.rs +++ b/src/quota.rs @@ -40,6 +40,15 @@ impl ResourceQuota { } } +impl Clone for ResourceQuota { + fn clone(&self) -> Self { + unsafe { + grpc_sys::grpc_resource_quota_ref(self.raw); + } + Self { raw: self.raw } + } +} + impl Drop for ResourceQuota { fn drop(&mut self) { unsafe {