workaround for code generator bug

This commit is contained in:
John Smith
2022-02-01 20:22:01 -05:00
parent 4bfa72f2db
commit ece93a21e7
9 changed files with 1159 additions and 906 deletions

View File

@@ -26,7 +26,11 @@ impl ApiLogger {
loop {
match rx.recv().await {
Ok(v) => {
(update_callback)(VeilidUpdate::Log(v.0, v.1)).await;
(update_callback)(VeilidUpdate::Log {
log_level: v.0,
message: v.1,
})
.await;
}
Err(_) => {
// Nothing to be done here...

View File

@@ -1,5 +1,5 @@
#[cfg(target_os = "android")]
pub mod android;
#[cfg(target_os = "ios")]
#[cfg(all(target_os = "ios", feature = "ios_tests"))]
pub mod ios_test_setup;
pub mod network_interfaces;

View File

@@ -130,7 +130,10 @@ impl VeilidLogLevel {
#[derive(Debug, Clone)]
pub enum VeilidUpdate {
Log(VeilidLogLevel, String),
Log {
log_level: VeilidLogLevel,
message: String,
},
Attachment(AttachmentState),
}
@@ -1167,7 +1170,10 @@ impl VeilidAPI {
timeout_ms: Option<u32>,
) -> Result<(), VeilidAPIError> {
match update {
VeilidUpdate::Log(_l, _s) => {
VeilidUpdate::Log {
log_level: _,
message: _,
} => {
// No point in waiting for a log
}
VeilidUpdate::Attachment(cs) => {