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

@@ -92,7 +92,7 @@ impl From<usize> for Ref<'static> {
/// starting at the beginning of `replacement`.
///
/// If no such valid reference could be found, None is returned.
fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef> {
fn find_cap_ref(replacement: &[u8]) -> Option<CaptureRef<'_>> {
let mut i = 0;
if replacement.len() <= 1 || replacement[0] != b'$' {
return None;

View File

@@ -38,8 +38,6 @@ implementations.
#![deny(missing_docs)]
extern crate memchr;
use std::fmt;
use std::io;
use std::ops;
@@ -304,7 +302,7 @@ pub struct ByteSet(BitSet);
struct BitSet([u64; 4]);
impl fmt::Debug for BitSet {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut fmtd = f.debug_set();
for b in (0..256).map(|b| b as u8) {
if ByteSet(*self).contains(b) {
@@ -494,7 +492,7 @@ impl ::std::error::Error for NoError {
}
impl fmt::Display for NoError {
fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
panic!("BUG for NoError: an impossible error occurred")
}
}

View File

@@ -1,6 +1,3 @@
extern crate grep_matcher;
extern crate regex;
mod util;
mod test_matcher;