Skip to content

Commit 35dc824

Browse files
committed
Format with rustfmt
1 parent 7c77ada commit 35dc824

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

crossbeam-channel/src/select.rs

+9-3
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,8 @@ fn run_select(
279279
// Find the selected operation.
280280
for (handle, i, ptr) in handles.iter_mut() {
281281
// Is this the selected operation?
282-
if sel == Selected::Operation(Operation::hook::<&dyn SelectHandle>(handle)) {
282+
if sel == Selected::Operation(Operation::hook::<&dyn SelectHandle>(handle))
283+
{
283284
// Try selecting this operation.
284285
if handle.accept(&mut token, cx) {
285286
return Some((*i, *ptr));
@@ -317,7 +318,10 @@ fn run_select(
317318
}
318319

319320
/// Runs until one of the operations becomes ready, potentially blocking the current thread.
320-
fn run_ready(handles: &mut [(&dyn SelectHandle, usize, *const u8)], timeout: Timeout) -> Option<usize> {
321+
fn run_ready(
322+
handles: &mut [(&dyn SelectHandle, usize, *const u8)],
323+
timeout: Timeout,
324+
) -> Option<usize> {
321325
if handles.is_empty() {
322326
// Wait until the timeout and return.
323327
match timeout {
@@ -455,7 +459,9 @@ pub fn try_select<'a>(
455459

456460
/// Blocks until one of the operations becomes ready and selects it.
457461
#[inline]
458-
pub fn select<'a>(handles: &mut [(&'a dyn SelectHandle, usize, *const u8)]) -> SelectedOperation<'a> {
462+
pub fn select<'a>(
463+
handles: &mut [(&'a dyn SelectHandle, usize, *const u8)],
464+
) -> SelectedOperation<'a> {
459465
if handles.is_empty() {
460466
panic!("no operations have been added to `Select`");
461467
}

0 commit comments

Comments
 (0)