refactor: use loops inside list literals (#60)

This commit is contained in:
Aleksey Kulikov 2022-05-25 12:16:40 +03:00 committed by GitHub
parent c35d336a56
commit ae2aef5e2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 65 additions and 106 deletions

View file

@ -43,14 +43,12 @@ class Stash extends Equatable {
String? message,
Set<GitStash> flags = const {GitStash.defaults},
}) {
final flagsInt = flags.fold(0, (int acc, e) => acc | e.value);
return Oid(
bindings.save(
repoPointer: repo.pointer,
stasherPointer: stasher.pointer,
message: message,
flags: flagsInt,
flags: flags.fold(0, (int acc, e) => acc | e.value),
),
);
}