tonic-build: use unified syntax to clone Arcs (#1182)

This commit is contained in:
Jan Teske
2022-12-13 13:22:54 -05:00
committed by GitHub
parent 35c4946d35
commit 25ea473abd
4 changed files with 11 additions and 11 deletions
@@ -337,7 +337,7 @@ pub mod server_reflection_server {
tonic::Streaming<super::ServerReflectionRequest>,
>,
) -> Self::Future {
let inner = self.0.clone();
let inner = Arc::clone(&self.0);
let fut = async move {
(*inner).server_reflection_info(request).await
};
@@ -388,7 +388,7 @@ pub mod server_reflection_server {
}
impl<T: ServerReflection> Clone for _Inner<T> {
fn clone(&self) -> Self {
Self(self.0.clone())
Self(Arc::clone(&self.0))
}
}
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {