mirror of
https://github.com/SkinnyMind/libgit2dart.git
synced 2025-05-05 04:39:07 -04:00
refactor: remove unnecessary local variables
This commit is contained in:
parent
cfa5268af2
commit
20ca75639d
48 changed files with 446 additions and 237 deletions
|
@ -24,6 +24,7 @@ Pointer<git_treebuilder> create({
|
|||
final error = libgit2.git_treebuilder_new(out, repoPointer, sourcePointer);
|
||||
|
||||
if (error < 0) {
|
||||
calloc.free(out);
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
} else {
|
||||
return out.value;
|
||||
|
@ -38,6 +39,7 @@ Pointer<git_oid> write(Pointer<git_treebuilder> bld) {
|
|||
final error = libgit2.git_treebuilder_write(out, bld);
|
||||
|
||||
if (error < 0) {
|
||||
calloc.free(out);
|
||||
throw LibGit2Error(libgit2.git_error_last());
|
||||
} else {
|
||||
return out;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue