From f2e78daa4290323621555a0c25afaf20e8371a2b Mon Sep 17 00:00:00 2001 From: Aleksey Kulikov Date: Fri, 31 Dec 2021 10:15:12 +0300 Subject: [PATCH] refactor: remove unnecessary directory existence check --- lib/src/bindings/attr.dart | 1 + test/helpers/util.dart | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/src/bindings/attr.dart b/lib/src/bindings/attr.dart index 27e8331..8bdd29e 100644 --- a/lib/src/bindings/attr.dart +++ b/lib/src/bindings/attr.dart @@ -41,4 +41,5 @@ Object? getAttribute({ calloc.free(out); return result; } + return null; } diff --git a/test/helpers/util.dart b/test/helpers/util.dart index 344ce03..bfdb505 100644 --- a/test/helpers/util.dart +++ b/test/helpers/util.dart @@ -3,10 +3,6 @@ import 'package:path/path.dart' as p; Directory setupRepo(Directory repoDir) { final tmpDir = Directory.systemTemp.createTempSync('testrepo'); - if (tmpDir.existsSync()) { - tmpDir.deleteSync(recursive: true); - } - tmpDir.createSync(); copyRepo(from: repoDir, to: tmpDir); return tmpDir; }