Fix tons of warnings in newest nightly (#2784)

* Fix tons of warnings in newest nightly

* Fix sr-api-macro doc tests
This commit is contained in:
Bastian Köcher
2019-06-04 20:09:49 +02:00
committed by GitHub
parent 9700029203
commit 6142f95611
73 changed files with 359 additions and 316 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ pub struct HexDisplay<'a>(&'a [u8]);
impl<'a> HexDisplay<'a> {
/// Create new instance that will display `d` as a hex string when displayed.
pub fn from(d: &'a AsBytesRef) -> Self { HexDisplay(d.as_bytes_ref()) }
pub fn from(d: &'a dyn AsBytesRef) -> Self { HexDisplay(d.as_bytes_ref()) }
}
impl<'a> ::core::fmt::Display for HexDisplay<'a> {
@@ -79,7 +79,7 @@ pub fn ascii_format(asciish: &[u8]) -> String {
let mut latch = false;
for c in asciish {
match (latch, *c) {
(false, 32...127) => r.push(*c as char),
(false, 32..=127) => r.push(*c as char),
_ => {
if !latch {
r.push('#');