Add warning checks (#80)

This commit is contained in:
Joseph Richey
2019-08-12 06:10:21 -07:00
committed by Artyom Pavlov
parent 7449a087f2
commit f94b44aa86
2 changed files with 3 additions and 2 deletions
+2 -2
View File
@@ -76,7 +76,7 @@ fn os_err_desc(_errno: i32, _buf: &mut [u8]) -> Option<&str> {
}
impl fmt::Debug for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let mut dbg = f.debug_struct("Error");
if let Some(errno) = self.raw_os_error() {
dbg.field("os_error", &errno);
@@ -95,7 +95,7 @@ impl fmt::Debug for Error {
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
if let Some(errno) = self.raw_os_error() {
let mut buf = [0u8; 128];
match os_err_desc(errno, &mut buf) {
+1
View File
@@ -126,6 +126,7 @@
)]
#![no_std]
#![cfg_attr(feature = "stdweb", recursion_limit = "128")]
#![warn(rust_2018_idioms, unused_lifetimes)]
#[macro_use]
extern crate cfg_if;