File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed
Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -428,7 +428,7 @@ impl Compilation {
428428 module_executor,
429429 in_finish_make : AtomicBool :: new ( false ) ,
430430
431- build_module_graph_artifact : BuildModuleGraphArtifact :: default ( ) . into ( ) ,
431+ build_module_graph_artifact : Default :: default ( ) ,
432432 modified_files,
433433 removed_files,
434434 input_filesystem,
Original file line number Diff line number Diff line change @@ -3,9 +3,18 @@ use std::{
33 ops:: { Deref , DerefMut } ,
44} ;
55
6- #[ derive( Debug , Default ) ]
6+ #[ derive( Debug ) ]
77pub struct DerefOption < T > ( Option < T > ) ;
88
9+ impl < T > Default for DerefOption < T >
10+ where
11+ T : Default ,
12+ {
13+ fn default ( ) -> Self {
14+ Self ( Some ( T :: default ( ) ) )
15+ }
16+ }
17+
918impl < T > From < T > for DerefOption < T > {
1019 fn from ( value : T ) -> Self {
1120 Self :: new ( value)
@@ -40,10 +49,7 @@ impl<T> Deref for DerefOption<T> {
4049 . unwrap_or_else ( || panic ! ( "should set in compilation first" ) )
4150 }
4251}
43- impl < T > DerefMut for DerefOption < T >
44- where
45- T : Debug ,
46- {
52+ impl < T > DerefMut for DerefOption < T > {
4753 fn deref_mut ( & mut self ) -> & mut Self :: Target {
4854 self
4955 . 0
You can’t perform that action at this time.
0 commit comments