Skip to content

Commit c48b5e8

Browse files
dependabot[bot]sandeepnRES
authored andcommitted
build(deps): bump the cargo group across 3 directories with 1 update
Bumps the cargo group with 1 update in the /packages/cactus-core-api directory: [tonic](https://github.com/hyperium/tonic). Bumps the cargo group with 1 update in the /weaver/common/protos-rs directory: [tonic](https://github.com/hyperium/tonic). Bumps the cargo group with 1 update in the /weaver/core/relay directory: [tonic](https://github.com/hyperium/tonic). Updates `tonic` from 0.10.2 to 0.12.3 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](hyperium/tonic@v0.10.2...v0.12.3) Updates `tonic` from 0.10.2 to 0.12.3 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](hyperium/tonic@v0.10.2...v0.12.3) Updates `tonic` from 0.10.2 to 0.12.3 - [Release notes](https://github.com/hyperium/tonic/releases) - [Changelog](https://github.com/hyperium/tonic/blob/master/CHANGELOG.md) - [Commits](hyperium/tonic@v0.10.2...v0.12.3) --- updated-dependencies: - dependency-name: tonic dependency-type: direct:production dependency-group: cargo - dependency-name: tonic dependency-type: direct:production dependency-group: cargo - dependency-name: tonic dependency-type: direct:production dependency-group: cargo ... Signed-off-by: dependabot[bot] <[email protected]>
1 parent dba6162 commit c48b5e8

23 files changed

+2159
-878
lines changed

packages/cactus-core-api/Cargo.lock

+122-95
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/cactus-core-api/Cargo.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ path = "src/main/rust/pb.rs"
1010

1111

1212
[dependencies]
13-
tonic = {version="0.10.2", features = ["tls"]}
14-
prost = "0.12.3"
15-
tokio = { version = "1.39.2", features = ["macros", "fs"] }
13+
tonic = {version="0.12.3", features = ["tls"]}
14+
prost = "0.13.3"
15+
tokio = { version = "1.40.0", features = ["macros", "fs"] }
1616
serde = {version="1.0.193", features = ["derive"]}
1717

1818
[build-dependencies]
19-
tonic-build = "0.10.2"
19+
tonic-build = "0.12.3"
2020

2121

2222

packages/cactus-core-api/src/main/rust/generated/proto-rs/common.ack.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1+
// This file is @generated by prost-build.
12
/// This message respresents "ACKs" sent between relay-relay,
23
/// relay-driver and relay-network
34
#[derive(serde::Serialize, serde::Deserialize)]
4-
#[allow(clippy::derive_partial_eq_without_eq)]
55
#[derive(Clone, PartialEq, ::prost::Message)]
66
pub struct Ack {
77
#[prost(enumeration = "ack::Status", tag = "2")]
@@ -39,8 +39,8 @@ pub mod ack {
3939
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
4040
pub fn as_str_name(&self) -> &'static str {
4141
match self {
42-
Status::Ok => "OK",
43-
Status::Error => "ERROR",
42+
Self::Ok => "OK",
43+
Self::Error => "ERROR",
4444
}
4545
}
4646
/// Creates an enum from field names used in the ProtoBuf definition.

packages/cactus-core-api/src/main/rust/generated/proto-rs/common.query.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
// This file is @generated by prost-build.
12
/// the payload to define the data that is being requested
23
#[derive(serde::Serialize, serde::Deserialize)]
3-
#[allow(clippy::derive_partial_eq_without_eq)]
44
#[derive(Clone, PartialEq, ::prost::Message)]
55
pub struct Query {
66
#[prost(string, repeated, tag = "1")]

packages/cactus-core-api/src/main/rust/generated/proto-rs/common.state.rs

+9-14
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
// This file is @generated by prost-build.
12
/// Metadata for a View
23
#[derive(serde::Serialize, serde::Deserialize)]
3-
#[allow(clippy::derive_partial_eq_without_eq)]
44
#[derive(Clone, PartialEq, ::prost::Message)]
55
pub struct Meta {
66
/// Underlying distributed ledger protocol.
@@ -46,10 +46,10 @@ pub mod meta {
4646
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
4747
pub fn as_str_name(&self) -> &'static str {
4848
match self {
49-
Protocol::Bitcoin => "BITCOIN",
50-
Protocol::Ethereum => "ETHEREUM",
51-
Protocol::Fabric => "FABRIC",
52-
Protocol::Corda => "CORDA",
49+
Self::Bitcoin => "BITCOIN",
50+
Self::Ethereum => "ETHEREUM",
51+
Self::Fabric => "FABRIC",
52+
Self::Corda => "CORDA",
5353
}
5454
}
5555
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -65,7 +65,6 @@ pub mod meta {
6565
}
6666
}
6767
#[derive(serde::Serialize, serde::Deserialize)]
68-
#[allow(clippy::derive_partial_eq_without_eq)]
6968
#[derive(Clone, PartialEq, ::prost::Message)]
7069
pub struct View {
7170
#[prost(message, optional, tag = "1")]
@@ -78,7 +77,6 @@ pub struct View {
7877
}
7978
/// View represents the response from a remote network
8079
#[derive(serde::Serialize, serde::Deserialize)]
81-
#[allow(clippy::derive_partial_eq_without_eq)]
8280
#[derive(Clone, PartialEq, ::prost::Message)]
8381
pub struct ViewPayload {
8482
#[prost(string, tag = "1")]
@@ -89,7 +87,6 @@ pub struct ViewPayload {
8987
/// Nested message and enum types in `ViewPayload`.
9088
pub mod view_payload {
9189
#[derive(serde::Serialize, serde::Deserialize)]
92-
#[allow(clippy::derive_partial_eq_without_eq)]
9390
#[derive(Clone, PartialEq, ::prost::Oneof)]
9491
pub enum State {
9592
#[prost(message, tag = "2")]
@@ -101,7 +98,6 @@ pub mod view_payload {
10198
/// the payload that is used for the communication between the requesting relay
10299
/// and its network
103100
#[derive(serde::Serialize, serde::Deserialize)]
104-
#[allow(clippy::derive_partial_eq_without_eq)]
105101
#[derive(Clone, PartialEq, ::prost::Message)]
106102
pub struct RequestState {
107103
#[prost(string, tag = "1")]
@@ -141,10 +137,10 @@ pub mod request_state {
141137
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
142138
pub fn as_str_name(&self) -> &'static str {
143139
match self {
144-
Status::PendingAck => "PENDING_ACK",
145-
Status::Pending => "PENDING",
146-
Status::Error => "ERROR",
147-
Status::Completed => "COMPLETED",
140+
Self::PendingAck => "PENDING_ACK",
141+
Self::Pending => "PENDING",
142+
Self::Error => "ERROR",
143+
Self::Completed => "COMPLETED",
148144
}
149145
}
150146
/// Creates an enum from field names used in the ProtoBuf definition.
@@ -159,7 +155,6 @@ pub mod request_state {
159155
}
160156
}
161157
#[derive(serde::Serialize, serde::Deserialize)]
162-
#[allow(clippy::derive_partial_eq_without_eq)]
163158
#[derive(Clone, PartialEq, ::prost::Oneof)]
164159
pub enum State {
165160
#[prost(message, tag = "3")]

packages/cactus-core-api/src/main/rust/generated/proto-rs/driver.driver.rs

+43-39
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// This file is @generated by prost-build.
12
/// Generated client implementations.
23
pub mod driver_communication_client {
3-
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
4+
#![allow(
5+
unused_variables,
6+
dead_code,
7+
missing_docs,
8+
clippy::wildcard_imports,
9+
clippy::let_unit_value,
10+
)]
411
use tonic::codegen::*;
512
use tonic::codegen::http::Uri;
613
#[derive(Debug, Clone)]
@@ -22,8 +29,8 @@ pub mod driver_communication_client {
2229
where
2330
T: tonic::client::GrpcService<tonic::body::BoxBody>,
2431
T::Error: Into<StdError>,
25-
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
26-
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
32+
T::ResponseBody: Body<Data = Bytes> + std::marker::Send + 'static,
33+
<T::ResponseBody as Body>::Error: Into<StdError> + std::marker::Send,
2734
{
2835
pub fn new(inner: T) -> Self {
2936
let inner = tonic::client::Grpc::new(inner);
@@ -48,7 +55,7 @@ pub mod driver_communication_client {
4855
>,
4956
<T as tonic::codegen::Service<
5057
http::Request<tonic::body::BoxBody>,
51-
>>::Error: Into<StdError> + Send + Sync,
58+
>>::Error: Into<StdError> + std::marker::Send + std::marker::Sync,
5259
{
5360
DriverCommunicationClient::new(InterceptedService::new(inner, interceptor))
5461
}
@@ -96,8 +103,7 @@ pub mod driver_communication_client {
96103
.ready()
97104
.await
98105
.map_err(|e| {
99-
tonic::Status::new(
100-
tonic::Code::Unknown,
106+
tonic::Status::unknown(
101107
format!("Service was not ready: {}", e.into()),
102108
)
103109
})?;
@@ -119,11 +125,17 @@ pub mod driver_communication_client {
119125
}
120126
/// Generated server implementations.
121127
pub mod driver_communication_server {
122-
#![allow(unused_variables, dead_code, missing_docs, clippy::let_unit_value)]
128+
#![allow(
129+
unused_variables,
130+
dead_code,
131+
missing_docs,
132+
clippy::wildcard_imports,
133+
clippy::let_unit_value,
134+
)]
123135
use tonic::codegen::*;
124136
/// Generated trait containing gRPC methods that should be implemented for use with DriverCommunicationServer.
125137
#[async_trait]
126-
pub trait DriverCommunication: Send + Sync + 'static {
138+
pub trait DriverCommunication: std::marker::Send + std::marker::Sync + 'static {
127139
/// the remote relay sends a RequestDriverState request to its driver with a
128140
/// query defining the data it wants to receive
129141
async fn request_driver_state(
@@ -135,20 +147,18 @@ pub mod driver_communication_server {
135147
>;
136148
}
137149
#[derive(Debug)]
138-
pub struct DriverCommunicationServer<T: DriverCommunication> {
139-
inner: _Inner<T>,
150+
pub struct DriverCommunicationServer<T> {
151+
inner: Arc<T>,
140152
accept_compression_encodings: EnabledCompressionEncodings,
141153
send_compression_encodings: EnabledCompressionEncodings,
142154
max_decoding_message_size: Option<usize>,
143155
max_encoding_message_size: Option<usize>,
144156
}
145-
struct _Inner<T>(Arc<T>);
146-
impl<T: DriverCommunication> DriverCommunicationServer<T> {
157+
impl<T> DriverCommunicationServer<T> {
147158
pub fn new(inner: T) -> Self {
148159
Self::from_arc(Arc::new(inner))
149160
}
150161
pub fn from_arc(inner: Arc<T>) -> Self {
151-
let inner = _Inner(inner);
152162
Self {
153163
inner,
154164
accept_compression_encodings: Default::default(),
@@ -198,8 +208,8 @@ pub mod driver_communication_server {
198208
impl<T, B> tonic::codegen::Service<http::Request<B>> for DriverCommunicationServer<T>
199209
where
200210
T: DriverCommunication,
201-
B: Body + Send + 'static,
202-
B::Error: Into<StdError> + Send + 'static,
211+
B: Body + std::marker::Send + 'static,
212+
B::Error: Into<StdError> + std::marker::Send + 'static,
203213
{
204214
type Response = http::Response<tonic::body::BoxBody>;
205215
type Error = std::convert::Infallible;
@@ -211,7 +221,6 @@ pub mod driver_communication_server {
211221
Poll::Ready(Ok(()))
212222
}
213223
fn call(&mut self, req: http::Request<B>) -> Self::Future {
214-
let inner = self.inner.clone();
215224
match req.uri().path() {
216225
"/driver.driver.DriverCommunication/RequestDriverState" => {
217226
#[allow(non_camel_case_types)]
@@ -249,7 +258,6 @@ pub mod driver_communication_server {
249258
let max_encoding_message_size = self.max_encoding_message_size;
250259
let inner = self.inner.clone();
251260
let fut = async move {
252-
let inner = inner.0;
253261
let method = RequestDriverStateSvc(inner);
254262
let codec = tonic::codec::ProstCodec::default();
255263
let mut grpc = tonic::server::Grpc::new(codec)
@@ -268,20 +276,25 @@ pub mod driver_communication_server {
268276
}
269277
_ => {
270278
Box::pin(async move {
271-
Ok(
272-
http::Response::builder()
273-
.status(200)
274-
.header("grpc-status", "12")
275-
.header("content-type", "application/grpc")
276-
.body(empty_body())
277-
.unwrap(),
278-
)
279+
let mut response = http::Response::new(empty_body());
280+
let headers = response.headers_mut();
281+
headers
282+
.insert(
283+
tonic::Status::GRPC_STATUS,
284+
(tonic::Code::Unimplemented as i32).into(),
285+
);
286+
headers
287+
.insert(
288+
http::header::CONTENT_TYPE,
289+
tonic::metadata::GRPC_CONTENT_TYPE,
290+
);
291+
Ok(response)
279292
})
280293
}
281294
}
282295
}
283296
}
284-
impl<T: DriverCommunication> Clone for DriverCommunicationServer<T> {
297+
impl<T> Clone for DriverCommunicationServer<T> {
285298
fn clone(&self) -> Self {
286299
let inner = self.inner.clone();
287300
Self {
@@ -293,18 +306,9 @@ pub mod driver_communication_server {
293306
}
294307
}
295308
}
296-
impl<T: DriverCommunication> Clone for _Inner<T> {
297-
fn clone(&self) -> Self {
298-
Self(Arc::clone(&self.0))
299-
}
300-
}
301-
impl<T: std::fmt::Debug> std::fmt::Debug for _Inner<T> {
302-
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
303-
write!(f, "{:?}", self.0)
304-
}
305-
}
306-
impl<T: DriverCommunication> tonic::server::NamedService
307-
for DriverCommunicationServer<T> {
308-
const NAME: &'static str = "driver.driver.DriverCommunication";
309+
/// Generated gRPC service name
310+
pub const SERVICE_NAME: &str = "driver.driver.DriverCommunication";
311+
impl<T> tonic::server::NamedService for DriverCommunicationServer<T> {
312+
const NAME: &'static str = SERVICE_NAME;
309313
}
310314
}

0 commit comments

Comments
 (0)