Skip to content

Commit

Permalink
Remove unecessary list creation
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardehrenfried committed Oct 11, 2023
1 parent c511d44 commit 941b2bd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ void modes(CombinationMode mode, Itinerary itinerary, Money totalPrice, String h
assertEquals(totalPrice, price);

var firstLeg = itinerary.getTransitLeg(0);
var uses = List.copyOf(fare.legProductsFromComponents().get(firstLeg));
var uses = fare.legProductsFromComponents().get(firstLeg);
assertEquals(1, uses.size());

var secondLeg = itinerary.getTransitLeg(1);
uses = List.copyOf(fare.legProductsFromComponents().get(secondLeg));
uses = fare.legProductsFromComponents().get(secondLeg);
assertEquals(1, uses.size());
}

Expand Down

0 comments on commit 941b2bd

Please sign in to comment.