mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
style: use "map/where" instead of "for" loop
This commit is contained in:
parent
3a0fa75929
commit
cfa5268af2
28 changed files with 193 additions and 323 deletions
|
@ -87,8 +87,7 @@ class Blob {
|
|||
int contextLines = 3,
|
||||
int interhunkLines = 0,
|
||||
}) {
|
||||
final int flagsInt =
|
||||
flags.fold(0, (previousValue, e) => previousValue | e.value);
|
||||
final int flagsInt = flags.fold(0, (acc, e) => acc | e.value);
|
||||
|
||||
final result = patch_bindings.fromBlobs(
|
||||
oldBlobPointer: _blobPointer,
|
||||
|
@ -116,8 +115,7 @@ class Blob {
|
|||
int contextLines = 3,
|
||||
int interhunkLines = 0,
|
||||
}) {
|
||||
final int flagsInt =
|
||||
flags.fold(0, (previousValue, e) => previousValue | e.value);
|
||||
final int flagsInt = flags.fold(0, (acc, e) => acc | e.value);
|
||||
|
||||
final result = patch_bindings.fromBlobAndBuffer(
|
||||
oldBlobPointer: _blobPointer,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue