Deny 2018 idioms
This commit is contained in:
parent
b374de6097
commit
009ef2356f
|
@ -1,3 +1,5 @@
|
|||
#![deny(rust_2018_idioms)]
|
||||
|
||||
use std::env::var;
|
||||
|
||||
use miette::{IntoDiagnostic, Result};
|
||||
|
|
|
@ -69,7 +69,7 @@ pub async fn from_origin(path: impl AsRef<Path>) -> (Vec<IgnoreFile>, Vec<Error>
|
|||
Ok(Some(path)) => match GitConfig::open(&path) {
|
||||
Err(err) => errors.push(Error::new(ErrorKind::Other, err)),
|
||||
Ok(config) => {
|
||||
if let Ok(excludes) = config.value::<GitPath>("core", None, "excludesFile") {
|
||||
if let Ok(excludes) = config.value::<GitPath<'_>>("core", None, "excludesFile") {
|
||||
match excludes.interpolate(None) {
|
||||
Ok(e) => {
|
||||
discover_file(
|
||||
|
@ -209,7 +209,7 @@ pub async fn from_environment() -> (Vec<IgnoreFile>, Vec<Error>) {
|
|||
match GitConfig::from_env_paths(&options) {
|
||||
Err(err) => errors.push(Error::new(ErrorKind::Other, err)),
|
||||
Ok(config) => {
|
||||
if let Ok(excludes) = config.value::<GitPath>("core", None, "excludesFile") {
|
||||
if let Ok(excludes) = config.value::<GitPath<'_>>("core", None, "excludesFile") {
|
||||
match excludes.interpolate(None) {
|
||||
Ok(e) => {
|
||||
if discover_file(
|
||||
|
|
|
@ -94,6 +94,7 @@
|
|||
#![doc(html_favicon_url = "https://watchexec.github.io/logo:watchexec.svg")]
|
||||
#![doc(html_logo_url = "https://watchexec.github.io/logo:watchexec.svg")]
|
||||
#![warn(clippy::unwrap_used, missing_docs)]
|
||||
#![deny(rust_2018_idioms)]
|
||||
#![cfg_attr(not(target_os = "fuchsia"), forbid(unsafe_code))]
|
||||
// see event::ProcessEnd for why this is disabled on fuchsia
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ impl<T> fmt::Debug for SwapLock<T>
|
|||
where
|
||||
T: fmt::Debug + Clone,
|
||||
{
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
|
||||
f.debug_struct("SwapLock")
|
||||
.field("(watch)", &self.r)
|
||||
.finish()
|
||||
|
|
Loading…
Reference in New Issue