• remram
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    3 years ago

    I think they just repeat the same sequence multiple times instead of using variables:

    oreAncillaryProductInfo.setSeatRequestTransactionId( sabreEnhancedBookResponse.getEnhancedHotelBookRS().getTravelItineraryRead().getTravelItinerary().getOpenReservationElements().getOpenReservationElement().get(i).getAncillaryProduct().getXmlData() .getAncillaryServiceData().getSeatRequestTransactionID()); oreAncillaryProductInfo.setPaperDocRequired( sabreEnhancedBookResponse.getEnhancedHotelBookRS().getTravelItineraryRead().getTravelItinerary().getOpenReservationElements().getOpenReservationElement().get(i).getAncillaryProduct().getXmlData() .getAncillaryServiceData().getPaperDocRequired()); …

    No idiomatic use of Rust (or Java) would yield this code. In any case, in both Java and Rust whitespace doesn’t matter so you can make those lines shorter even when writing functional-style code.