Skip to content

Commit 9430c46

Browse files
committed
tidy api
1 parent c0734b5 commit 9430c46

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

communication/src/initialize.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -282,12 +282,9 @@ pub struct WorkerGuards<T:Send+'static> {
282282

283283
impl<T:Send+'static> WorkerGuards<T> {
284284

285-
/// Returns the number of guards.
286-
pub fn len(&self) -> usize { self.guards.len() }
287-
288285
/// Returns a reference to the indexed guard.
289-
pub fn guard(&self, index: usize) -> &std::thread::JoinHandle<T> {
290-
&self.guards[index]
286+
pub fn guards(&self) -> &[std::thread::JoinHandle<T>] {
287+
&self.guards[..]
291288
}
292289

293290
/// Waits on the worker threads and returns the results they produce.

0 commit comments

Comments
 (0)