diff --git a/poem-grpc-build/src/server.rs b/poem-grpc-build/src/server.rs index fad11d8eba..a8f1196548 100644 --- a/poem-grpc-build/src/server.rs +++ b/poem-grpc-build/src/server.rs @@ -128,7 +128,7 @@ pub(crate) fn generate(config: &GrpcConfig, service: &Service, buf: &mut String) Self { inner: ::std::sync::Arc::new(service), send_compressd: ::std::option::Option::None, - accept_compressed: ::std::default::Default::default(), + accept_compressed: ::std::sync::Arc::new([]), } } diff --git a/poem-grpc/src/client.rs b/poem-grpc/src/client.rs index 07a17a814b..f5ff77c46c 100644 --- a/poem-grpc/src/client.rs +++ b/poem-grpc/src/client.rs @@ -166,7 +166,7 @@ impl GrpcClient { Self { ep: create_client_endpoint(config), send_compressd: None, - accept_compressed: Default::default(), + accept_compressed: Arc::new([]), } } @@ -179,7 +179,7 @@ impl GrpcClient { Self { ep: Arc::new(ToDynEndpoint(ep.map_to_response())), send_compressd: None, - accept_compressed: Default::default(), + accept_compressed: Arc::new([]), } }