Skip to content

Commit c13d379

Browse files
authored
implement Clone for ResourceQuota (#568)
Signed-off-by: glorv <[email protected]>
1 parent 9d5dd69 commit c13d379

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/quota.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@ impl ResourceQuota {
4040
}
4141
}
4242

43+
impl Clone for ResourceQuota {
44+
fn clone(&self) -> Self {
45+
unsafe {
46+
grpc_sys::grpc_resource_quota_ref(self.raw);
47+
}
48+
Self { raw: self.raw }
49+
}
50+
}
51+
4352
impl Drop for ResourceQuota {
4453
fn drop(&mut self) {
4554
unsafe {

0 commit comments

Comments
 (0)