mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: use loops inside list literals (#60)
This commit is contained in:
parent
c35d336a56
commit
ae2aef5e2e
13 changed files with 65 additions and 106 deletions
|
@ -211,20 +211,16 @@ class Remote extends Equatable {
|
|||
final refs = bindings.lsRemotes(_remotePointer);
|
||||
bindings.disconnect(_remotePointer);
|
||||
|
||||
final result = <RemoteReference>[];
|
||||
for (final ref in refs) {
|
||||
result.add(
|
||||
return <RemoteReference>[
|
||||
for (final ref in refs)
|
||||
RemoteReference._(
|
||||
isLocal: ref['local']! as bool,
|
||||
localId: ref['loid'] as Oid?,
|
||||
name: ref['name']! as String,
|
||||
oid: ref['oid']! as Oid,
|
||||
symRef: ref['symref']! as String,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
return result;
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
/// Downloads new data and updates tips.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue