Skip to content

Commit c3d8b6a

Browse files
committed
Fix format for Kotlin
1 parent fa517e4 commit c3d8b6a

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

crates/core/src/sync/interface.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ pub enum Instruction {
4444
EstablishSyncStream {
4545
request: StreamingSyncRequest,
4646
},
47-
FlushFileSystem,
48-
CloseSyncStream,
47+
// These two are defined like this because deserializers in Kotlin can't support either an
48+
// object or a literal value
49+
FlushFileSystem {},
50+
CloseSyncStream {},
4951
}
5052

5153
#[derive(Serialize)]

crates/core/src/sync/streaming_sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ impl SyncClient {
7777
}
7878
Ok(done) => {
7979
if done {
80-
active.instructions.push(Instruction::CloseSyncStream);
80+
active.instructions.push(Instruction::CloseSyncStream {});
8181
*state = ClientState::Idle;
8282
}
8383
}

dart/test/goldens/simple_iteration.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"buckets": [],
2020
"include_checksum": true,
2121
"raw_data": true,
22+
"binary_data": true,
2223
"client_id": "test-test-test-test",
2324
"parameters": null
2425
}

dart/test/goldens/starting_stream.json

+1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"buckets": [],
2020
"include_checksum": true,
2121
"raw_data": true,
22+
"binary_data": true,
2223
"client_id": "test-test-test-test",
2324
"parameters": null
2425
}

dart/test/sync_test.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ void _syncTests<T>({
410410
'line': contains("Checksums didn't match, failed for: a")
411411
}
412412
},
413-
'CloseSyncStream',
413+
{'CloseSyncStream': {}},
414414
],
415415
);
416416

0 commit comments

Comments
 (0)