Skip to content

Commit f94b44a

Browse files
josephlrnewpavlov
authored andcommitted
Add warning checks (#80)
1 parent 7449a08 commit f94b44a

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fn os_err_desc(_errno: i32, _buf: &mut [u8]) -> Option<&str> {
7676
}
7777

7878
impl fmt::Debug for Error {
79-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
79+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
8080
let mut dbg = f.debug_struct("Error");
8181
if let Some(errno) = self.raw_os_error() {
8282
dbg.field("os_error", &errno);
@@ -95,7 +95,7 @@ impl fmt::Debug for Error {
9595
}
9696

9797
impl fmt::Display for Error {
98-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
98+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9999
if let Some(errno) = self.raw_os_error() {
100100
let mut buf = [0u8; 128];
101101
match os_err_desc(errno, &mut buf) {

src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@
126126
)]
127127
#![no_std]
128128
#![cfg_attr(feature = "stdweb", recursion_limit = "128")]
129+
#![warn(rust_2018_idioms, unused_lifetimes)]
129130

130131
#[macro_use]
131132
extern crate cfg_if;

0 commit comments

Comments
 (0)