From 5675f9265ced95fb93257a629c4f973f60bcc0cb Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Thu, 2 Sep 2021 14:17:44 +0300 Subject: [PATCH] style: use fat arrow for single-line methods --- lib/src/commit.dart | 4 +--- lib/src/config.dart | 4 +--- lib/src/index.dart | 4 +--- lib/src/odb.dart | 4 +--- lib/src/reference.dart | 4 +--- lib/src/reflog.dart | 4 +--- lib/src/repository.dart | 4 +--- lib/src/revwalk.dart | 4 +--- lib/src/signature.dart | 4 +--- 9 files changed, 9 insertions(+), 27 deletions(-) diff --git a/lib/src/commit.dart b/lib/src/commit.dart index cbeb8f2..3494089 100644 --- a/lib/src/commit.dart +++ b/lib/src/commit.dart @@ -100,7 +100,5 @@ class Commit { Oid get tree => Oid(bindings.tree(_commitPointer)); /// Releases memory allocated for commit object. - void free() { - bindings.free(_commitPointer); - } + void free() => bindings.free(_commitPointer); } diff --git a/lib/src/config.dart b/lib/src/config.dart index b6b5370..8bf72fc 100644 --- a/lib/src/config.dart +++ b/lib/src/config.dart @@ -140,7 +140,5 @@ class Config { } /// Releases memory allocated for config object. - void free() { - bindings.free(_configPointer); - } + void free() => bindings.free(_configPointer); } diff --git a/lib/src/index.dart b/lib/src/index.dart index 0adea12..2788bb7 100644 --- a/lib/src/index.dart +++ b/lib/src/index.dart @@ -138,9 +138,7 @@ class Index { void removeAll(List path) => bindings.removeAll(_indexPointer, path); /// Releases memory allocated for index object. - void free() { - bindings.free(_indexPointer); - } + void free() => bindings.free(_indexPointer); } class IndexEntry { diff --git a/lib/src/odb.dart b/lib/src/odb.dart index a19c400..2c0358d 100644 --- a/lib/src/odb.dart +++ b/lib/src/odb.dart @@ -26,7 +26,5 @@ class Odb { } /// Releases memory allocated for odb object. - void free() { - bindings.free(_odbPointer); - } + void free() => bindings.free(_odbPointer); } diff --git a/lib/src/reference.dart b/lib/src/reference.dart index 1321687..bd6f48f 100644 --- a/lib/src/reference.dart +++ b/lib/src/reference.dart @@ -238,7 +238,5 @@ class Reference { int get hashCode => _refPointer.address.hashCode; /// Releases memory allocated for reference object. - void free() { - bindings.free(_refPointer); - } + void free() => bindings.free(_refPointer); } diff --git a/lib/src/reflog.dart b/lib/src/reflog.dart index 78d9140..979dabf 100644 --- a/lib/src/reflog.dart +++ b/lib/src/reflog.dart @@ -43,9 +43,7 @@ class RefLog { } /// Releases memory allocated for reflog object. - void free() { - bindings.free(_reflogPointer); - } + void free() => bindings.free(_reflogPointer); } class RefLogEntry { diff --git a/lib/src/repository.dart b/lib/src/repository.dart index e86a857..4f3aa17 100644 --- a/lib/src/repository.dart +++ b/lib/src/repository.dart @@ -212,9 +212,7 @@ class Repository { } /// Releases memory allocated for repository object. - void free() { - bindings.free(_repoPointer); - } + void free() => bindings.free(_repoPointer); /// Returns the configuration file for this repository. /// diff --git a/lib/src/revwalk.dart b/lib/src/revwalk.dart index 433f084..d1197ed 100644 --- a/lib/src/revwalk.dart +++ b/lib/src/revwalk.dart @@ -81,7 +81,5 @@ class RevWalk { void simplifyFirstParent() => bindings.simplifyFirstParent(_revWalkPointer); /// Releases memory allocated for [RevWalk] object. - void free() { - bindings.free(_revWalkPointer); - } + void free() => bindings.free(_revWalkPointer); } diff --git a/lib/src/signature.dart b/lib/src/signature.dart index 1f23717..948b3f8 100644 --- a/lib/src/signature.dart +++ b/lib/src/signature.dart @@ -66,7 +66,5 @@ class Signature { int get hashCode => _signaturePointer.address.hashCode; /// Releases memory allocated for signature object. - void free() { - bindings.free(_signaturePointer); - } + void free() => bindings.free(_signaturePointer); }