Browse Source

replace deprecated trim_right() with trim_end()

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Message-Id: <20190714115231.7002-1-mail@beyermatthias.de>
embed
Matthias Beyer 3 years ago
committed by Manos Pitsidianakis
parent
commit
1e729010c1
Signed by untrusted user: epilys GPG Key ID: 73627C2F690DF710
  1. 2
      ui/src/components/mail/view.rs
  2. 2
      ui/src/components/mail/view/envelope.rs
  3. 2
      ui/src/terminal/cells.rs

2
ui/src/components/mail/view.rs

@ -240,7 +240,7 @@ impl MailView {
let mut buf = CellBuffer::from(s);
if highlight_urls {
let lines: Vec<&str> = s.split('\n').map(|l| l.trim_right()).collect();
let lines: Vec<&str> = s.split('\n').map(|l| l.trim_end()).collect();
let mut shift = 0;
let mut lidx_total = 0;
let finder = LinkFinder::new();

2
ui/src/components/mail/view/envelope.rs

@ -192,7 +192,7 @@ impl EnvelopeView {
let mut buf = CellBuffer::from(s);
if highlight_urls {
let lines: Vec<&str> = s.split('\n').map(|l| l.trim_right()).collect();
let lines: Vec<&str> = s.split('\n').map(|l| l.trim_end()).collect();
let mut shift = 0;
let mut lidx_total = 0;
let finder = LinkFinder::new();

2
ui/src/terminal/cells.rs

@ -242,7 +242,7 @@ impl Default for CellBuffer {
impl<'a> From<&'a str> for CellBuffer {
fn from(s: &'a str) -> Self {
let lines: Vec<&str> = s.lines().map(|l| l.trim_right()).collect();
let lines: Vec<&str> = s.lines().map(|l| l.trim_end()).collect();
let len = s.len() + lines.len();
let mut buf = CellBuffer::new(len, 1, Cell::default());
let mut x = 0;

Loading…
Cancel
Save