Skip to content

Commit

Permalink
fix: fixes issues with the UTF8 Chunks library
Browse files Browse the repository at this point in the history
  • Loading branch information
JoseGomesJr authored and matheuswhite committed May 10, 2024
1 parent 38c61f8 commit cb91d0e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#![deny(warnings)]
#![feature(utf8_chunks)]

extern crate core;

Expand Down
3 changes: 1 addition & 2 deletions src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ use crate::text::ViewData;
use chrono::{DateTime, Local};
use ratatui::style::Color;
use std::borrow::Cow;
use std::str::Utf8Chunks;

pub enum UserTxData {
Data {
Expand Down Expand Up @@ -64,7 +63,7 @@ impl SerialRxData {
}

fn from_utf8_print_invalid(v: &[u8]) -> Cow<'_, str> {
let mut iter = Utf8Chunks::new(v);
let mut iter = v.utf8_chunks();

let chunk = if let Some(chunk) = iter.next() {
let valid = chunk.valid();
Expand Down

0 comments on commit cb91d0e

Please sign in to comment.