Skip to content

Commit f4b8b68

Browse files
committed
Switch to 2018 edition
1 parent f7afa13 commit f4b8b68

File tree

4 files changed

+4
-6
lines changed

4 files changed

+4
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ readme = "README.md"
88
documentation = "https://docs.rs/rustc_version/"
99
repository = "https://github.com/Kimundi/rustc-version-rs"
1010
keywords = ["version", "rustc"]
11+
edition = "2018"
1112

1213
[badges]
1314
travis-ci = { repository = "Kimundi/rustc-version-rs" }

src/errors.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ pub enum Error {
8787
/// An error occurred in parsing a `LlvmVersion`.
8888
LlvmVersionError(LlvmVersionParseError),
8989
}
90-
use Error::*;
90+
use crate::Error::*;
9191

9292
impl fmt::Display for Error {
93-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
93+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
9494
match *self {
9595
CouldNotExecuteCommand(ref e) => write!(f, "could not execute command: {}", e),
9696
CommandError {

src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ extern crate doc_comment;
5959
#[cfg(test)]
6060
doctest!("../README.md");
6161

62-
extern crate semver;
6362
use semver::Identifier;
6463
use std::process::Command;
6564
use std::{env, fmt, str};
@@ -70,7 +69,7 @@ use std::{ffi::OsString, str::FromStr};
7069
pub use semver::Version;
7170

7271
mod errors;
73-
pub use errors::{Error, LlvmVersionParseError, Result};
72+
pub use crate::errors::{Error, LlvmVersionParseError, Result};
7473

7574
/// Release channel of the compiler.
7675
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]

tests/all.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#![allow(clippy::match_like_matches_macro)]
22

3-
extern crate rustc_version;
4-
53
use std::process::Command;
64

75
use rustc_version::{

0 commit comments

Comments
 (0)