Commit c6085e1 1 parent 9d0fd29 commit c6085e1 Copy full SHA for c6085e1
File tree 1 file changed +4
-6
lines changed
1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -189,31 +189,29 @@ impl Series {
189
189
///
190
190
/// returns a true if the episode is newly added into the series and vice versa is true
191
191
pub async fn add_episode ( & mut self , season_number : u32 , episode : Episode ) -> bool {
192
- let is_newly_added = loop {
192
+ loop {
193
193
if let Some ( season) = self . seasons . get_mut ( & season_number) {
194
194
break season. track_episode ( self . id , season_number, episode) . await ;
195
195
} else {
196
196
self . add_season ( season_number) ;
197
197
}
198
- } ;
199
- is_newly_added
198
+ }
200
199
}
201
200
202
201
pub async fn add_episodes (
203
202
& mut self ,
204
203
season_number : u32 ,
205
204
episodes_range : RangeInclusive < u32 > ,
206
205
) -> AddResult {
207
- let add_result = loop {
206
+ loop {
208
207
if let Some ( season) = self . seasons . get_mut ( & season_number) {
209
208
break season
210
209
. track_episodes ( self . id , season_number, episodes_range)
211
210
. await ;
212
211
} else {
213
212
self . add_season ( season_number) ;
214
213
}
215
- } ;
216
- add_result
214
+ }
217
215
}
218
216
219
217
/// removes an episode from the series
You can’t perform that action at this time.
0 commit comments