File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -737,7 +737,8 @@ impl Profile {
737
737
/// cause to build a unit twice. By deferring the choice until we know
738
738
/// whether to choose the optimized value or the default value, we can make sure
739
739
/// the unit is only built once and the unit graph is still optimized.
740
- #[ derive( Debug , Copy , Clone ) ]
740
+ #[ derive( Debug , Copy , Clone , serde:: Serialize ) ]
741
+ #[ serde( untagged) ]
741
742
pub enum DebugInfo {
742
743
/// No debuginfo level was set.
743
744
None ,
@@ -788,15 +789,6 @@ impl DebugInfo {
788
789
}
789
790
}
790
791
791
- impl serde:: Serialize for DebugInfo {
792
- fn serialize < S > ( & self , serializer : S ) -> Result < S :: Ok , S :: Error >
793
- where
794
- S : serde:: Serializer ,
795
- {
796
- self . to_option ( ) . serialize ( serializer)
797
- }
798
- }
799
-
800
792
impl PartialEq for DebugInfo {
801
793
fn eq ( & self , other : & DebugInfo ) -> bool {
802
794
self . to_option ( ) . eq ( & other. to_option ( ) )
You can’t perform that action at this time.
0 commit comments