Skip to content

Commit

Permalink
Switch to 2018 edition
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Jan 11, 2021
1 parent f7afa13 commit f4b8b68
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ readme = "README.md"
documentation = "https://docs.rs/rustc_version/"
repository = "https://github.com/Kimundi/rustc-version-rs"
keywords = ["version", "rustc"]
edition = "2018"

[badges]
travis-ci = { repository = "Kimundi/rustc-version-rs" }
Expand Down
4 changes: 2 additions & 2 deletions src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ pub enum Error {
/// An error occurred in parsing a `LlvmVersion`.
LlvmVersionError(LlvmVersionParseError),
}
use Error::*;
use crate::Error::*;

impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match *self {
CouldNotExecuteCommand(ref e) => write!(f, "could not execute command: {}", e),
CommandError {
Expand Down
3 changes: 1 addition & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ extern crate doc_comment;
#[cfg(test)]
doctest!("../README.md");

extern crate semver;
use semver::Identifier;
use std::process::Command;
use std::{env, fmt, str};
Expand All @@ -70,7 +69,7 @@ use std::{ffi::OsString, str::FromStr};
pub use semver::Version;

mod errors;
pub use errors::{Error, LlvmVersionParseError, Result};
pub use crate::errors::{Error, LlvmVersionParseError, Result};

/// Release channel of the compiler.
#[derive(Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug)]
Expand Down
2 changes: 0 additions & 2 deletions tests/all.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![allow(clippy::match_like_matches_macro)]

extern crate rustc_version;

use std::process::Command;

use rustc_version::{
Expand Down

0 comments on commit f4b8b68

Please sign in to comment.