File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,7 +99,8 @@ impl AssetPool {
9999 decommissioned. extend ( to_decommission) ;
100100 }
101101
102- /// Mothball the specified assets if they are no longer in the active pool and put them back again.
102+ /// Mothball the specified assets if they are no longer in the active pool and put them back
103+ /// again.
103104 ///
104105 /// # Arguments
105106 ///
@@ -114,10 +115,12 @@ impl AssetPool {
114115 I : IntoIterator < Item = AssetRef > ,
115116 {
116117 for mut asset in assets {
117- if match asset. state {
118+ let in_pool = match asset. state {
118119 AssetState :: Commissioned { .. } => !self . assets . contains ( & asset) ,
119120 _ => panic ! ( "Cannot mothball asset that has not been commissioned" ) ,
120- } {
121+ } ;
122+
123+ if in_pool {
121124 // If not already set, we set the current year as the mothball year,
122125 // i.e. the first one the asset was not used.
123126 if asset. get_mothballed_year ( ) . is_none ( ) {
You can’t perform that action at this time.
0 commit comments