edition: run 'cargo fix --edition --edition-idioms --all'

This commit is contained in:
Andrew Gallant
2021-06-01 19:47:46 -04:00
parent 77a9e99964
commit af54069c51
36 changed files with 107 additions and 137 deletions

View File

@@ -90,7 +90,7 @@ enum Data<'a> {
}
impl<'a> Data<'a> {
fn from_bytes(bytes: &[u8]) -> Data {
fn from_bytes(bytes: &[u8]) -> Data<'_> {
match str::from_utf8(bytes) {
Ok(text) => Data::Text { text: Cow::Borrowed(text) },
Err(_) => Data::Bytes { bytes },
@@ -98,7 +98,7 @@ impl<'a> Data<'a> {
}
#[cfg(unix)]
fn from_path(path: &Path) -> Data {
fn from_path(path: &Path) -> Data<'_> {
use std::os::unix::ffi::OsStrExt;
match path.to_str() {