Skip to content

Commit bb55f8a

Browse files
author
vatsalkeshav
committed
xds module : fix clippy warnings and fmt errors
1 parent 9a548ef commit bb55f8a

3 files changed

Lines changed: 9 additions & 10 deletions

File tree

src/rust/src/xds/handlers.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -180,15 +180,15 @@ impl CcxDecodersXdsContext<'_> {
180180
for i in 0..NUM_XDS_BUFFERS {
181181
if self.xds_buffers[i].in_use != 0
182182
&& self.xds_buffers[i]
183-
.xds_class
184-
.map(|c| c.to_c_int())
185-
.unwrap_or(-1)
186-
== xds_class
183+
.xds_class
184+
.map(|c| c.to_c_int())
185+
.unwrap_or(-1)
186+
== xds_class
187187
&& self.xds_buffers[i]
188-
.xds_type
189-
.map(|t| t.to_c_int())
190-
.unwrap_or(-1)
191-
== lo as i32
188+
.xds_type
189+
.map(|t| t.to_c_int())
190+
.unwrap_or(-1)
191+
== lo as i32
192192
{
193193
matching_buf = i as i32;
194194
break;

src/rust/src/xds/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub mod types;
1717

1818
use crate::bindings::*;
1919
use crate::ctorust::FromCType;
20-
use crate::libccxr_exports::time::generate_timing_context;
2120
use crate::libccxr_exports::time::apply_timing_info;
21+
use crate::libccxr_exports::time::generate_timing_context;
2222
use crate::xds::handlers::{do_end_of_xds, TS_START_OF_XDS};
2323
use crate::xds::types::{copy_xds_context_from_rust_to_c, CcxDecodersXdsContext};
2424
use std::os::raw::c_int;

src/rust/src/xds/types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ use crate::ctorust::FromCType;
4141
use crate::libccxr_exports::time::write_back_to_common_timing_ctx;
4242
use lib_ccxr::time::TimingContext;
4343
use std::os::raw::c_int;
44-
use std::ptr::null_mut;
4544

4645
pub const NUM_BYTES_PER_PACKET: usize = 35; // Class + type (repeated for convenience) + data + zero
4746
pub const NUM_XDS_BUFFERS: usize = 9; // CEA recommends no more than one level of interleaving. Play it safe

0 commit comments

Comments
 (0)