diff options
Diffstat (limited to 'examples/graphemes-std.rs')
-rw-r--r-- | examples/graphemes-std.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/examples/graphemes-std.rs b/examples/graphemes-std.rs index 3522736..647739d 100644 --- a/examples/graphemes-std.rs +++ b/examples/graphemes-std.rs @@ -1,5 +1,3 @@ -extern crate unicode_segmentation; - use std::error::Error; use std::io::{self, BufRead, Write}; @@ -18,8 +16,7 @@ fn main() -> Result<(), Box<dyn Error>> { .take(10) .last() .unwrap_or(line.len()); - #[allow(deprecated)] // for Rust 1.28.0 - stdout.write_all(line[..end].trim_right().as_bytes())?; + stdout.write_all(line[..end].trim_end().as_bytes())?; stdout.write_all(b"\n")?; line.clear(); |