Rust 2018 idioms

This commit is contained in:
gwenn
2018-12-07 21:57:04 +01:00
parent 92020d54b7
commit d874180333
27 changed files with 142 additions and 146 deletions

View File

@@ -9,7 +9,7 @@ fn main() {
#[cfg(feature = "bundled")]
mod build {
extern crate cc;
use cc;
use std::path::Path;
pub fn main(out_dir: &str, out_path: &Path) {
@@ -94,7 +94,7 @@ impl From<HeaderLocation> for String {
#[cfg(not(feature = "bundled"))]
mod build {
extern crate pkg_config;
use pkg_config;
#[cfg(all(feature = "vcpkg", target_env = "msvc"))]
extern crate vcpkg;
@@ -201,7 +201,7 @@ mod bindings {
#[cfg(feature = "buildtime_bindgen")]
mod bindings {
extern crate bindgen;
use bindgen;
use self::bindgen::callbacks::{IntKind, ParseCallbacks};
use super::HeaderLocation;

View File

@@ -98,7 +98,7 @@ impl Error {
}
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
write!(
f,
"Error code {}: {}",