Rust dep updates

This commit is contained in:
Yorhel 2019-05-25 08:27:23 +02:00
parent fbd7b71d73
commit f0df5092c3
9 changed files with 431 additions and 467 deletions

View file

@ -216,7 +216,7 @@ impl FmtBuf {
// - https://manned.org/urn/8cb83e85
// TODO: Add heuristic to only remove ) at the end of the URL if there is no matching (
// inside the URL.
let url = url.trim_right_matches(|c|
let url = url.trim_end_matches(|c|
match c { '.' | ',' | ';' | ')' | '⟩' | '\'' | ':' | ']' | '}' => true, _ => false }
);
if url.len() < 10 {
@ -266,7 +266,7 @@ impl FmtBuf {
// Find the indices where the first line ends, and the last line starts. These are used to
// efficiently disable reference formatting on the first and last line.
let firstlineend = self.buf.find('\n').unwrap_or(self.buf.len());
let lastlinestart = self.buf.trim_right_matches('\n').rfind('\n').unwrap_or(0);
let lastlinestart = self.buf.trim_end_matches('\n').rfind('\n').unwrap_or(0);
// This regex is used to quickly *find* interesting patterns, any further validation
// and processing is done afterwards by the (slower) specialized flush_ methods.