Skip to content

Commit 4c5b0a3

Browse files
lints (#424)
Summary: Pull Request resolved: #424 fix some lints Reviewed By: amirafzali Differential Revision: D77742948 fbshipit-source-id: c4e5da7f6d98ab38f026e565c5fcb4e3d833e7db
1 parent 750c058 commit 4c5b0a3

File tree

6 files changed

+14
-11
lines changed

6 files changed

+14
-11
lines changed

hyperactor/src/actor.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ mod tests {
793793
.unwrap();
794794

795795
// TODO: Fix this receiver hanging issue in T200423722.
796+
#[allow(clippy::disallowed_methods)]
796797
let res: Result<Result<bool, MailboxError>, tokio::time::error::Elapsed> =
797798
timeout(Duration::from_secs(5), local_receiver.recv()).await;
798799
assert!(res.is_err());

hyperactor/src/simnet.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -680,6 +680,7 @@ impl ProxyHandle {
680680
tokio::spawn(async move {
681681
'outer: loop {
682682
// timeout the wait to enable stop signal checking at least every 100ms.
683+
#[allow(clippy::disallowed_methods)]
683684
if let Ok(Ok(msg)) = timeout(Duration::from_millis(100), rx.recv()).await {
684685
let proxy_message: ProxyMessage = msg.deserialized().unwrap();
685686
let event: Box<dyn Event> = match proxy_message.dest_addr {

hyperactor_mesh/src/alloc/process.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ impl Child {
249249
tokio::spawn(async move {
250250
let exit_timeout =
251251
hyperactor::config::global::get(hyperactor::config::PROCESS_EXIT_TIMEOUT);
252+
#[allow(clippy::disallowed_methods)]
252253
if tokio::time::timeout(exit_timeout, exit_flag).await.is_err() {
253254
let _ = stop_reason.set(ProcStopReason::Watchdog);
254255
group.fail();

hyperactor_mesh/src/comm.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ use hyperactor::WorldId;
2727
use hyperactor::data::Serialized;
2828
use hyperactor::mailbox::DeliveryError;
2929
use hyperactor::mailbox::MailboxSender;
30-
use hyperactor::mailbox::MessageEnvelope;
3130
use hyperactor::mailbox::Undeliverable;
3231
use hyperactor::mailbox::UndeliverableMailboxSender;
3332
use hyperactor::mailbox::UndeliverableMessageError;

hyperactor_mesh/test/process_allocator_cleanup/process_allocator_cleanup.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ async fn test_process_allocator_child_cleanup() {
5151

5252
// Read events until we have enough running children
5353
loop {
54+
#[allow(clippy::disallowed_methods)]
5455
match timeout(Duration::from_secs(30), reader.next_line()).await {
5556
Ok(Ok(Some(line))) => {
5657
if let Ok(proc_state) = serde_json::from_str::<ProcState>(&line) {
@@ -117,6 +118,7 @@ async fn test_process_allocator_child_cleanup() {
117118
.expect("Failed to kill parent process");
118119

119120
// Wait for the parent to be killed
121+
#[allow(clippy::disallowed_methods)]
120122
let wait_result = timeout(Duration::from_secs(5), child.wait()).await;
121123
match wait_result {
122124
Ok(Ok(status)) => eprintln!("Parent process exited with status: {:?}", status),

monarch_rdma/src/test_utils.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,21 @@ pub mod test_utils {
127127
let parsed_idx = idx
128128
.parse::<usize>()
129129
.expect("Device index is not a valid integer");
130-
let device_str1 = (backend.to_string(), parsed_idx.to_string());
130+
let _device_str1 = (backend.to_string(), parsed_idx.to_string());
131131
} else {
132132
assert!(devices.0 == "cpu");
133-
let device_str1 = (devices.0.to_string(), 0);
133+
let _device_str1 = (devices.0.to_string(), 0);
134134
}
135135

136136
if let Some((backend, idx)) = devices.1.split_once(':') {
137137
assert!(backend == "cuda");
138138
let parsed_idx = idx
139139
.parse::<usize>()
140140
.expect("Device index is not a valid integer");
141-
let device_str1 = (backend.to_string(), parsed_idx.to_string());
141+
let _device_str1 = (backend.to_string(), parsed_idx.to_string());
142142
} else {
143143
assert!(devices.1 == "cpu");
144-
let device_str2 = (devices.1.to_string(), 0);
144+
let _device_str2 = (devices.1.to_string(), 0);
145145
}
146146

147147
let alloc_1 = LocalAllocator
@@ -187,10 +187,9 @@ pub mod test_utils {
187187
unsafe {
188188
cu_check!(cuda_sys::cuInit(0));
189189

190-
let mut dptr: cuda_sys::CUdeviceptr = unsafe { std::mem::zeroed() };
191-
let mut handle: cuda_sys::CUmemGenericAllocationHandle =
192-
unsafe { std::mem::zeroed() };
193-
let mut padded_size: usize = 0;
190+
let mut dptr: cuda_sys::CUdeviceptr = std::mem::zeroed();
191+
let mut handle: cuda_sys::CUmemGenericAllocationHandle = std::mem::zeroed();
192+
let /*mut*/ padded_size: usize;
194193

195194
let mut device: cuda_sys::CUdevice = std::mem::zeroed();
196195
cu_check!(cuda_sys::cuDeviceGet(&mut device, device_str.1));
@@ -272,8 +271,8 @@ pub mod test_utils {
272271
}
273272
}
274273

275-
let buffer1 = vec![0u8; buffer_size].into_boxed_slice();
276-
let buffer2 = vec![0u8; buffer_size].into_boxed_slice();
274+
let _buffer1 = vec![0u8; buffer_size].into_boxed_slice();
275+
let _buffer2 = vec![0u8; buffer_size].into_boxed_slice();
277276
// Fill buffer1 with test data
278277
if device_str1.0 == "cuda" {
279278
let mut temp_buffer = vec![0u8; buffer_size].into_boxed_slice();

0 commit comments

Comments
 (0)