diff --git a/README.md b/README.md index b3c8235..1a43104 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ void setupLogger(){ void main(){ await RustLib.init(); - await setupLogger(); + setupLogger(); await test(i: 5); } diff --git a/example/bin/dart.dart b/example/bin/dart.dart index 1639308..74aa7d7 100644 --- a/example/bin/dart.dart +++ b/example/bin/dart.dart @@ -2,9 +2,8 @@ import 'dart:io'; import 'api.dart'; import 'frb_generated.dart'; -import 'dart:ffi' as ffi; -Future setupLogger() async { +void setupLogger() { infoLogger().listen((msg) { // This should use a logging framework in real applications print("${msg.logLevel} ${msg.lbl.padRight(8)}: ${msg.msg}"); @@ -13,7 +12,7 @@ Future setupLogger() async { void main(List arguments) async { await RustLib.init(); - await setupLogger(); + setupLogger(); await test(i: 12); try { await panic();