1
0
Fork 0

Don't use unwrap

This commit is contained in:
Daniele Tricoli 2023-03-02 23:24:34 +01:00
parent 9ad461a600
commit 64b899f0df
1 changed files with 1 additions and 1 deletions

View File

@ -154,7 +154,7 @@ pub async fn send(
if is_a_command {
let mut notification_stream = device.notifications().await?.take(1);
while let Some(data) = notification_stream.next().await {
let text = str::from_utf8(&data.value).unwrap();
let text = str::from_utf8(&data.value)?;
println!("{}", text.trim_end());
}
}