Closed Bug 1637809 Opened 5 years ago Closed 5 years ago

Remove weird use of `try_fold` in Golden Gate

Categories

(Firefox :: Sync, task)

task

Tracking

()

RESOLVED FIXED
Firefox 78
Tracking Status
firefox78 --- fixed

People

(Reporter: lina, Assigned: lina)

Details

Attachments

(1 file)

Rust is smart enough to collect a Map<Iterator<Item = T>, Fn(T) -> Result<U, E>> into a Result<Vec<U>, E>—in other words, if the map function returns a Result<U, E> for each element T, it can transpose it into a Result<Vec<U>, E> instead of a Vec<Result<U, E>>. This means we don't need the try_fold weirdness.

(It's also a good excuse for me to test out our a-s-dev/gecko-dev workflow with git-cinnabar! 🎉)

Pushed by kcambridge@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f7e109090fcd Replace `try_fold` with `map` in Golden Gate. r=eoger
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 78
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: