mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: use loops inside list literals
This commit is contained in:
parent
c35d336a56
commit
5c9c23f9f5
13 changed files with 65 additions and 106 deletions
|
@ -47,18 +47,13 @@ class Rebase {
|
|||
|
||||
/// List of operations that are to be applied.
|
||||
List<RebaseOperation> get operations {
|
||||
final result = <RebaseOperation>[];
|
||||
final operationsCount = bindings.operationsCount(_rebasePointer);
|
||||
|
||||
for (var i = 0; i < operationsCount; i++) {
|
||||
final operation = bindings.getOperationByIndex(
|
||||
rebase: _rebasePointer,
|
||||
index: i,
|
||||
);
|
||||
result.add(RebaseOperation._(operation));
|
||||
}
|
||||
|
||||
return result;
|
||||
return <RebaseOperation>[
|
||||
for (var i = 0; i < operationsCount; i++)
|
||||
RebaseOperation._(
|
||||
bindings.getOperationByIndex(rebase: _rebasePointer, index: i),
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
/// Index of the rebase operation that is currently being applied. If the
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue