mirror of
https://github.com/isar/rusqlite.git
synced 2025-08-20 12:59:28 +08:00
Rust 2018 idioms
This commit is contained in:
@@ -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;
|
||||
|
@@ -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 {}: {}",
|
||||
|
Reference in New Issue
Block a user