Skip to content

Commit

Permalink
implement Clone for ResourceQuota (#568)
Browse files Browse the repository at this point in the history
Signed-off-by: glorv <glorvs@163.com>
  • Loading branch information
glorv committed Apr 15, 2022
1 parent 9d5dd69 commit c13d379
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/quota.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit c13d379

Please sign in to comment.