@@ -86,7 +86,9 @@ impl PartialEq for ATNConfigSet {
8686impl Eq for ATNConfigSet { }
8787
8888impl Hash for ATNConfigSet {
89- fn hash < H : Hasher > ( & self , state : & mut H ) { self . configs . hash ( state) }
89+ fn hash < H : Hasher > ( & self , state : & mut H ) {
90+ self . configs . hash ( state)
91+ }
9092}
9193
9294impl ATNConfigSet {
@@ -113,7 +115,9 @@ impl ATNConfigSet {
113115 a
114116 }
115117
116- fn full_hash_key ( config : & ATNConfig ) -> Key { Key :: Full ( config. clone ( ) ) }
118+ fn full_hash_key ( config : & ATNConfig ) -> Key {
119+ Key :: Full ( config. clone ( ) )
120+ }
117121
118122 fn local_hash_key ( config : & ATNConfig ) -> Key {
119123 let mut hasher = MurmurHasher :: default ( ) ;
@@ -176,7 +180,9 @@ impl ATNConfigSet {
176180 true
177181 }
178182
179- pub fn add ( & mut self , config : Box < ATNConfig > ) -> bool { self . add_cached ( config, None ) }
183+ pub fn add ( & mut self , config : Box < ATNConfig > ) -> bool {
184+ self . add_cached ( config, None )
185+ }
180186
181187 pub fn get_items ( & self ) -> impl Iterator < Item = & ATNConfig > {
182188 self . configs . iter ( ) . map ( |c| c. as_ref ( ) )
@@ -197,19 +203,33 @@ impl ATNConfigSet {
197203 }
198204 }
199205
200- pub fn length ( & self ) -> usize { self . configs . len ( ) }
206+ pub fn length ( & self ) -> usize {
207+ self . configs . len ( )
208+ }
201209
202- pub fn is_empty ( & self ) -> bool { self . configs . is_empty ( ) }
210+ pub fn is_empty ( & self ) -> bool {
211+ self . configs . is_empty ( )
212+ }
203213
204- pub fn has_semantic_context ( & self ) -> bool { self . has_semantic_context }
214+ pub fn has_semantic_context ( & self ) -> bool {
215+ self . has_semantic_context
216+ }
205217
206- pub fn set_has_semantic_context ( & mut self , _v : bool ) { self . has_semantic_context = _v; }
218+ pub fn set_has_semantic_context ( & mut self , _v : bool ) {
219+ self . has_semantic_context = _v;
220+ }
207221
208- pub fn read_only ( & self ) -> bool { self . read_only }
222+ pub fn read_only ( & self ) -> bool {
223+ self . read_only
224+ }
209225
210- pub fn set_read_only ( & mut self , _read_only : bool ) { self . read_only = _read_only; }
226+ pub fn set_read_only ( & mut self , _read_only : bool ) {
227+ self . read_only = _read_only;
228+ }
211229
212- pub fn full_context ( & self ) -> bool { self . full_ctx }
230+ pub fn full_context ( & self ) -> bool {
231+ self . full_ctx
232+ }
213233
214234 //duplicate of the self.conflicting_alts???
215235 pub fn get_alts ( & self ) -> BitSet {
@@ -219,11 +239,19 @@ impl ATNConfigSet {
219239 } )
220240 }
221241
222- pub fn get_unique_alt ( & self ) -> isize { self . unique_alt }
242+ pub fn get_unique_alt ( & self ) -> isize {
243+ self . unique_alt
244+ }
223245
224- pub fn set_unique_alt ( & mut self , _v : isize ) { self . unique_alt = _v }
246+ pub fn set_unique_alt ( & mut self , _v : isize ) {
247+ self . unique_alt = _v
248+ }
225249
226- pub fn get_dips_into_outer_context ( & self ) -> bool { self . dips_into_outer_context }
250+ pub fn get_dips_into_outer_context ( & self ) -> bool {
251+ self . dips_into_outer_context
252+ }
227253
228- pub fn set_dips_into_outer_context ( & mut self , _v : bool ) { self . dips_into_outer_context = _v }
254+ pub fn set_dips_into_outer_context ( & mut self , _v : bool ) {
255+ self . dips_into_outer_context = _v
256+ }
229257}
0 commit comments