Skip to content

Commit

Permalink
fixed await/async in example
Browse files Browse the repository at this point in the history
  • Loading branch information
MnlPhlp committed Mar 10, 2024
1 parent f2247e5 commit fe9a0a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void setupLogger(){
void main(){
await RustLib.init();
await setupLogger();
setupLogger();
await test(i: 5);
}
Expand Down
5 changes: 2 additions & 3 deletions example/bin/dart.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ import 'dart:io';

import 'api.dart';
import 'frb_generated.dart';
import 'dart:ffi' as ffi;

Future<void> 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}");
Expand All @@ -13,7 +12,7 @@ Future<void> setupLogger() async {

void main(List<String> arguments) async {
await RustLib.init();
await setupLogger();
setupLogger();
await test(i: 12);
try {
await panic();
Expand Down

0 comments on commit fe9a0a2

Please sign in to comment.