Skip to content

Commit 4338c41

Browse files
committed
Fix user_id type
New shvrpc now has a RpcValue instead of an Option<String>. After checking the code, RpcValue::null is now treated the same way None was before.
1 parent 910c081 commit 4338c41

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/dirtylog.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ pub(crate) async fn dirtylog_task(
275275
value: data_change.value,
276276
access_level: AccessLevel::Read as _,
277277
short_time: data_change.short_time.unwrap_or(-1),
278-
user_id: Default::default(),
278+
user_id: shvproto::RpcValue::null(),
279279
repeat: !data_change.value_flags.contains(ValueFlags::SPONTANEOUS),
280280
provisional: true, // data_change.value_flags & (1 << VALUE_FLAG_PROVISIONAL_BIT) != 0,
281281
};
@@ -417,7 +417,7 @@ mod tests {
417417
value: 20.into(),
418418
access_level: 8,
419419
short_time: -1,
420-
user_id: None,
420+
user_id: shvproto::RpcValue::null(),
421421
repeat: true,
422422
provisional: true
423423
}],
@@ -441,7 +441,7 @@ mod tests {
441441
value: 20.into(),
442442
access_level: 8,
443443
short_time: -1,
444-
user_id: None,
444+
user_id: shvproto::RpcValue::null(),
445445
repeat: true,
446446
provisional: true
447447
}],

0 commit comments

Comments
 (0)