@@ -32,54 +32,54 @@ impl Generic {
3232 /// The index of the worker out of `(0..self.peers())`.
3333 pub fn index ( & self ) -> usize {
3434 match self {
35- & Generic :: Thread ( ref t) => t. index ( ) ,
36- & Generic :: Process ( ref p) => p. index ( ) ,
37- & Generic :: ProcessBinary ( ref pb) => pb. index ( ) ,
38- & Generic :: ZeroCopy ( ref z) => z. index ( ) ,
35+ Generic :: Thread ( t) => t. index ( ) ,
36+ Generic :: Process ( p) => p. index ( ) ,
37+ Generic :: ProcessBinary ( pb) => pb. index ( ) ,
38+ Generic :: ZeroCopy ( z) => z. index ( ) ,
3939 }
4040 }
4141 /// The number of workers.
4242 pub fn peers ( & self ) -> usize {
4343 match self {
44- & Generic :: Thread ( ref t) => t. peers ( ) ,
45- & Generic :: Process ( ref p) => p. peers ( ) ,
46- & Generic :: ProcessBinary ( ref pb) => pb. peers ( ) ,
47- & Generic :: ZeroCopy ( ref z) => z. peers ( ) ,
44+ Generic :: Thread ( t) => t. peers ( ) ,
45+ Generic :: Process ( p) => p. peers ( ) ,
46+ Generic :: ProcessBinary ( pb) => pb. peers ( ) ,
47+ Generic :: ZeroCopy ( z) => z. peers ( ) ,
4848 }
4949 }
5050 /// Constructs several send endpoints and one receive endpoint.
5151 fn allocate < T : Data > ( & mut self , identifier : usize ) -> ( Vec < Box < dyn Push < Message < T > > > > , Box < dyn Pull < Message < T > > > ) {
5252 match self {
53- & mut Generic :: Thread ( ref mut t) => t. allocate ( identifier) ,
54- & mut Generic :: Process ( ref mut p) => p. allocate ( identifier) ,
55- & mut Generic :: ProcessBinary ( ref mut pb) => pb. allocate ( identifier) ,
56- & mut Generic :: ZeroCopy ( ref mut z) => z. allocate ( identifier) ,
53+ Generic :: Thread ( t) => t. allocate ( identifier) ,
54+ Generic :: Process ( p) => p. allocate ( identifier) ,
55+ Generic :: ProcessBinary ( pb) => pb. allocate ( identifier) ,
56+ Generic :: ZeroCopy ( z) => z. allocate ( identifier) ,
5757 }
5858 }
5959 /// Perform work before scheduling operators.
6060 fn receive ( & mut self ) {
6161 match self {
62- & mut Generic :: Thread ( ref mut t) => t. receive ( ) ,
63- & mut Generic :: Process ( ref mut p) => p. receive ( ) ,
64- & mut Generic :: ProcessBinary ( ref mut pb) => pb. receive ( ) ,
65- & mut Generic :: ZeroCopy ( ref mut z) => z. receive ( ) ,
62+ Generic :: Thread ( t) => t. receive ( ) ,
63+ Generic :: Process ( p) => p. receive ( ) ,
64+ Generic :: ProcessBinary ( pb) => pb. receive ( ) ,
65+ Generic :: ZeroCopy ( z) => z. receive ( ) ,
6666 }
6767 }
6868 /// Perform work after scheduling operators.
6969 pub fn release ( & mut self ) {
7070 match self {
71- & mut Generic :: Thread ( ref mut t) => t. release ( ) ,
72- & mut Generic :: Process ( ref mut p) => p. release ( ) ,
73- & mut Generic :: ProcessBinary ( ref mut pb) => pb. release ( ) ,
74- & mut Generic :: ZeroCopy ( ref mut z) => z. release ( ) ,
71+ Generic :: Thread ( t) => t. release ( ) ,
72+ Generic :: Process ( p) => p. release ( ) ,
73+ Generic :: ProcessBinary ( pb) => pb. release ( ) ,
74+ Generic :: ZeroCopy ( z) => z. release ( ) ,
7575 }
7676 }
7777 fn events ( & self ) -> & Rc < RefCell < VecDeque < ( usize , Event ) > > > {
7878 match self {
79- & Generic :: Thread ( ref t) => t. events ( ) ,
80- & Generic :: Process ( ref p) => p. events ( ) ,
81- & Generic :: ProcessBinary ( ref pb) => pb. events ( ) ,
82- & Generic :: ZeroCopy ( ref z) => z. events ( ) ,
79+ Generic :: Thread ( ref t) => t. events ( ) ,
80+ Generic :: Process ( ref p) => p. events ( ) ,
81+ Generic :: ProcessBinary ( ref pb) => pb. events ( ) ,
82+ Generic :: ZeroCopy ( ref z) => z. events ( ) ,
8383 }
8484 }
8585}
@@ -96,10 +96,10 @@ impl Allocate for Generic {
9696 fn events ( & self ) -> & Rc < RefCell < VecDeque < ( usize , Event ) > > > { self . events ( ) }
9797 fn await_events ( & self , _duration : Option < std:: time:: Duration > ) {
9898 match self {
99- & Generic :: Thread ( ref t) => t. await_events ( _duration) ,
100- & Generic :: Process ( ref p) => p. await_events ( _duration) ,
101- & Generic :: ProcessBinary ( ref pb) => pb. await_events ( _duration) ,
102- & Generic :: ZeroCopy ( ref z) => z. await_events ( _duration) ,
99+ Generic :: Thread ( t) => t. await_events ( _duration) ,
100+ Generic :: Process ( p) => p. await_events ( _duration) ,
101+ Generic :: ProcessBinary ( pb) => pb. await_events ( _duration) ,
102+ Generic :: ZeroCopy ( z) => z. await_events ( _duration) ,
103103 }
104104 }
105105}
0 commit comments