File tree Expand file tree Collapse file tree 2 files changed +0
-14
lines changed
starlark/src/values/types/enumeration Expand file tree Collapse file tree 2 files changed +0
-14
lines changed Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ use crate::values::ValueTyped;
61
61
use crate :: values:: enumeration:: EnumValue ;
62
62
use crate :: values:: enumeration:: matcher:: EnumTypeMatcher ;
63
63
use crate :: values:: enumeration:: ty_enum_type:: TyEnumData ;
64
- use crate :: values:: enumeration:: value:: EnumValueGen ;
65
64
use crate :: values:: function:: FUNCTION_TYPE ;
66
65
use crate :: values:: index:: convert_index;
67
66
use crate :: values:: list:: AllocList ;
@@ -340,16 +339,6 @@ where
340
339
) ?) ;
341
340
Ok ( Arc :: new ( TyEnumData {
342
341
name : variable_name. to_owned ( ) ,
343
- variants : self
344
- . elements ( )
345
- . iter ( )
346
- . map ( |( _, enum_value) | {
347
- let enum_value: & EnumValueGen < _ > =
348
- EnumValue :: from_value ( enum_value. to_value ( ) )
349
- . expect ( "known to be enum value" ) ;
350
- Ty :: of_value ( enum_value. value )
351
- } )
352
- . collect ( ) ,
353
342
id : self . id ,
354
343
ty_enum_value,
355
344
ty_enum_type,
Original file line number Diff line number Diff line change @@ -25,8 +25,6 @@ use crate::values::types::type_instance_id::TypeInstanceId;
25
25
pub struct TyEnumData {
26
26
/// Name of the enum type.
27
27
pub ( crate ) name : String ,
28
- /// Types of variants.
29
- pub ( crate ) variants : Vec < Ty > ,
30
28
/// Globally unique id of the enum type.
31
29
// Id must be last so `Ord` is deterministic.
32
30
pub ( crate ) id : TypeInstanceId ,
@@ -48,6 +46,5 @@ impl std::hash::Hash for TyEnumData {
48
46
fn hash < H : std:: hash:: Hasher > ( & self , state : & mut H ) {
49
47
// Do not hash `id` because hashing should be deterministic.
50
48
self . name . hash ( state) ;
51
- self . variants . hash ( state) ;
52
49
}
53
50
}
You can’t perform that action at this time.
0 commit comments