From 33f299f8c67221d4bd05831e899e288f4ed14646 Mon Sep 17 00:00:00 2001 From: lunar-mining Date: Sun, 13 Mar 2022 22:18:56 +0100 Subject: [PATCH] poll() bug fix. write "Null" to Outbound object instead of empty String when the channel is "Null". --- bin/dnetview/src/main.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/dnetview/src/main.rs b/bin/dnetview/src/main.rs index 7ca68fb51..bd987e196 100644 --- a/bin/dnetview/src/main.rs +++ b/bin/dnetview/src/main.rs @@ -201,7 +201,9 @@ async fn poll(client: Map, model: Arc) -> Result<()> { if slot["channel"].is_null() { // channel is empty. initialize with empty values let state = &slot["state"]; - let channel = Channel::new(String::new(), String::new()); + let msg = "Null".to_string(); + let status = "Null".to_string(); + let channel = Channel::new(msg, status); let new_slot = Slot::new(String::new(), channel, state.as_str().unwrap().to_string()); slots.push(new_slot)