Skip to content

Commit 2427212

Browse files
committed
fixed clippy error because now decltype(NETWORK_STATISTICS) is a known type (was previously anon type)
Signed-off-by: HHN <harihara.sn@gmail.com>
1 parent 008964a commit 2427212

File tree

2 files changed

+93
-92
lines changed

2 files changed

+93
-92
lines changed

src/rs/ffi/linux_bindings.rs

Lines changed: 48 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -4870,6 +4870,52 @@ pub type QUIC_SET_CALLBACK_HANDLER_FN = ::std::option::Option<
48704870
>;
48714871
#[repr(C)]
48724872
#[derive(Debug, Copy, Clone)]
4873+
pub struct NETWORK_STATISTICS {
4874+
pub BytesInFlight: u32,
4875+
pub PostedBytes: u64,
4876+
pub IdealBytes: u64,
4877+
pub SmoothedRTT: u64,
4878+
pub CongestionWindow: u32,
4879+
pub Bandwidth: u64,
4880+
}
4881+
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4882+
const _: () = {
4883+
["Size of NETWORK_STATISTICS"]
4884+
[::std::mem::size_of::<NETWORK_STATISTICS>() - 48usize];
4885+
["Alignment of NETWORK_STATISTICS"]
4886+
[::std::mem::align_of::<NETWORK_STATISTICS>() - 8usize];
4887+
["Offset of field: NETWORK_STATISTICS::BytesInFlight"][::std::mem::offset_of!(
4888+
NETWORK_STATISTICS,
4889+
BytesInFlight
4890+
)
4891+
- 0usize];
4892+
["Offset of field: NETWORK_STATISTICS::PostedBytes"][::std::mem::offset_of!(
4893+
NETWORK_STATISTICS,
4894+
PostedBytes
4895+
)
4896+
- 8usize];
4897+
["Offset of field: NETWORK_STATISTICS::IdealBytes"][::std::mem::offset_of!(
4898+
NETWORK_STATISTICS,
4899+
IdealBytes
4900+
)
4901+
- 16usize];
4902+
["Offset of field: NETWORK_STATISTICS::SmoothedRTT"][::std::mem::offset_of!(
4903+
NETWORK_STATISTICS,
4904+
SmoothedRTT
4905+
)
4906+
- 24usize];
4907+
["Offset of field: NETWORK_STATISTICS::CongestionWindow"][::std::mem::offset_of!(
4908+
NETWORK_STATISTICS,
4909+
CongestionWindow
4910+
)
4911+
- 32usize];
4912+
["Offset of field: NETWORK_STATISTICS::Bandwidth"][::std::mem::offset_of!(
4913+
NETWORK_STATISTICS,
4914+
Bandwidth
4915+
) - 40usize];
4916+
};
4917+
#[repr(C)]
4918+
#[derive(Debug, Copy, Clone)]
48734919
pub struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W {
48744920
pub Attribute: ::std::os::raw::c_ulong,
48754921
pub BufferLength: ::std::os::raw::c_ulong,
@@ -5280,7 +5326,7 @@ pub union QUIC_CONNECTION_EVENT__bindgen_ty_1 {
52805326
pub PEER_CERTIFICATE_RECEIVED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_16,
52815327
pub RELIABLE_RESET_NEGOTIATED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_17,
52825328
pub ONE_WAY_DELAY_NEGOTIATED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_18,
5283-
pub NETWORK_STATISTICS: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5329+
pub NETWORK_STATISTICS: NETWORK_STATISTICS,
52845330
}
52855331
#[repr(C)]
52865332
#[derive(Debug, Copy, Clone)]
@@ -5776,52 +5822,7 @@ const _: () = {
57765822
)
57775823
- 1usize];
57785824
};
5779-
#[repr(C)]
5780-
#[derive(Debug, Copy, Clone)]
5781-
pub struct QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19 {
5782-
pub BytesInFlight: u32,
5783-
pub PostedBytes: u64,
5784-
pub IdealBytes: u64,
5785-
pub SmoothedRTT: u64,
5786-
pub CongestionWindow: u32,
5787-
pub Bandwidth: u64,
5788-
}
5789-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5790-
const _: () = {
5791-
["Size of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19"]
5792-
[::std::mem::size_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19>() - 48usize];
5793-
["Alignment of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19"]
5794-
[::std::mem::align_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19>() - 8usize];
5795-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::BytesInFlight"][::std::mem::offset_of!(
5796-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5797-
BytesInFlight
5798-
)
5799-
- 0usize];
5800-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::PostedBytes"][::std::mem::offset_of!(
5801-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5802-
PostedBytes
5803-
)
5804-
- 8usize];
5805-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::IdealBytes"][::std::mem::offset_of!(
5806-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5807-
IdealBytes
5808-
)
5809-
- 16usize];
5810-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::SmoothedRTT"][::std::mem::offset_of!(
5811-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5812-
SmoothedRTT
5813-
)
5814-
- 24usize];
5815-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::CongestionWindow"][::std::mem::offset_of!(
5816-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5817-
CongestionWindow
5818-
)
5819-
- 32usize];
5820-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::Bandwidth"][::std::mem::offset_of!(
5821-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5822-
Bandwidth
5823-
) - 40usize];
5824-
};
5825+
58255826
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
58265827
const _: () = {
58275828
["Size of QUIC_CONNECTION_EVENT__bindgen_ty_1"]

src/rs/ffi/win_bindings.rs

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -4862,6 +4862,50 @@ pub type QUIC_SET_CALLBACK_HANDLER_FN = ::std::option::Option<
48624862
Context: *mut ::std::os::raw::c_void,
48634863
),
48644864
>;
4865+
pub struct NETWORK_STATISTICS {
4866+
pub BytesInFlight: u32,
4867+
pub PostedBytes: u64,
4868+
pub IdealBytes: u64,
4869+
pub SmoothedRTT: u64,
4870+
pub CongestionWindow: u32,
4871+
pub Bandwidth: u64,
4872+
}
4873+
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
4874+
const _: () = {
4875+
["Size of NETWORK_STATISTICS"]
4876+
[::std::mem::size_of::<NETWORK_STATISTICS>() - 48usize];
4877+
["Alignment of NETWORK_STATISTICS"]
4878+
[::std::mem::align_of::<NETWORK_STATISTICS>() - 8usize];
4879+
["Offset of field: NETWORK_STATISTICS::BytesInFlight"][::std::mem::offset_of!(
4880+
NETWORK_STATISTICS,
4881+
BytesInFlight
4882+
)
4883+
- 0usize];
4884+
["Offset of field: NETWORK_STATISTICS::PostedBytes"][::std::mem::offset_of!(
4885+
NETWORK_STATISTICS,
4886+
PostedBytes
4887+
)
4888+
- 8usize];
4889+
["Offset of field: NETWORK_STATISTICS::IdealBytes"][::std::mem::offset_of!(
4890+
NETWORK_STATISTICS,
4891+
IdealBytes
4892+
)
4893+
- 16usize];
4894+
["Offset of field: NETWORK_STATISTICS::SmoothedRTT"][::std::mem::offset_of!(
4895+
NETWORK_STATISTICS,
4896+
SmoothedRTT
4897+
)
4898+
- 24usize];
4899+
["Offset of field: NETWORK_STATISTICS::CongestionWindow"][::std::mem::offset_of!(
4900+
NETWORK_STATISTICS,
4901+
CongestionWindow
4902+
)
4903+
- 32usize];
4904+
["Offset of field: NETWORK_STATISTICS::Bandwidth"][::std::mem::offset_of!(
4905+
NETWORK_STATISTICS,
4906+
Bandwidth
4907+
) - 40usize];
4908+
};
48654909
#[repr(C)]
48664910
#[derive(Debug, Copy, Clone)]
48674911
pub struct QUIC_SCHANNEL_CREDENTIAL_ATTRIBUTE_W {
@@ -5310,7 +5354,7 @@ pub union QUIC_CONNECTION_EVENT__bindgen_ty_1 {
53105354
pub PEER_CERTIFICATE_RECEIVED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_16,
53115355
pub RELIABLE_RESET_NEGOTIATED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_17,
53125356
pub ONE_WAY_DELAY_NEGOTIATED: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_18,
5313-
pub NETWORK_STATISTICS: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5357+
pub NETWORK_STATISTICS: NETWORK_STATISTICS,
53145358
}
53155359
#[repr(C)]
53165360
#[derive(Debug, Copy, Clone)]
@@ -5808,50 +5852,6 @@ const _: () = {
58085852
};
58095853
#[repr(C)]
58105854
#[derive(Debug, Copy, Clone)]
5811-
pub struct QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19 {
5812-
pub BytesInFlight: u32,
5813-
pub PostedBytes: u64,
5814-
pub IdealBytes: u64,
5815-
pub SmoothedRTT: u64,
5816-
pub CongestionWindow: u32,
5817-
pub Bandwidth: u64,
5818-
}
5819-
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
5820-
const _: () = {
5821-
["Size of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19"]
5822-
[::std::mem::size_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19>() - 48usize];
5823-
["Alignment of QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19"]
5824-
[::std::mem::align_of::<QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19>() - 8usize];
5825-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::BytesInFlight"][::std::mem::offset_of!(
5826-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5827-
BytesInFlight
5828-
)
5829-
- 0usize];
5830-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::PostedBytes"][::std::mem::offset_of!(
5831-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5832-
PostedBytes
5833-
)
5834-
- 8usize];
5835-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::IdealBytes"][::std::mem::offset_of!(
5836-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5837-
IdealBytes
5838-
)
5839-
- 16usize];
5840-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::SmoothedRTT"][::std::mem::offset_of!(
5841-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5842-
SmoothedRTT
5843-
)
5844-
- 24usize];
5845-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::CongestionWindow"][::std::mem::offset_of!(
5846-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5847-
CongestionWindow
5848-
)
5849-
- 32usize];
5850-
["Offset of field: QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19::Bandwidth"][::std::mem::offset_of!(
5851-
QUIC_CONNECTION_EVENT__bindgen_ty_1__bindgen_ty_19,
5852-
Bandwidth
5853-
) - 40usize];
5854-
};
58555855
#[allow(clippy::unnecessary_operation, clippy::identity_op)]
58565856
const _: () = {
58575857
["Size of QUIC_CONNECTION_EVENT__bindgen_ty_1"]

0 commit comments

Comments
 (0)