Skip to content

Commit

Permalink
Update to edition 2018
Browse files Browse the repository at this point in the history
  • Loading branch information
kornelski committed Aug 16, 2024
1 parent 246ece2 commit 02f7519
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fail-fast: false
matrix:
rust:
- 1.30.0
- 1.31.0
- stable
- beta
- nightly
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
[package]

name = "pkg-config"
version = "0.3.30"
authors = ["Alex Crichton <alex@alexcrichton.com>"]
Expand All @@ -12,7 +11,8 @@ A library to run the pkg-config system tool at build time in order to be used in
Cargo build scripts.
"""
keywords = ["build-dependencies"]
rust-version = "1.30"
rust-version = "1.31"
edition = "2018"

[dev-dependencies]
lazy_static = "1"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# pkg-config-rs

[![Build Status](https://github.com/rust-lang/pkg-config-rs/actions/workflows/ci.yml/badge.svg)](https://github.com/rust-lang/pkg-config-rs/actions)
[![Rust](https://img.shields.io/badge/rust-1.30%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/pkg-config-rs/)
[![Rust](https://img.shields.io/badge/rust-1.31%2B-blue.svg?maxAge=3600)](https://github.com/rust-lang/pkg-config-rs/)

[Documentation](https://docs.rs/pkg-config)

Expand All @@ -13,7 +13,7 @@ You can use this crate directly to probe for specific libraries, or use
[system-deps](https://github.com/gdesmott/system-deps) to declare all your
`pkg-config` dependencies in `Cargo.toml`.

This library requires Rust 1.30+.
This library requires Rust 1.31+.

# Example

Expand Down
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,14 +259,14 @@ impl Display for WrappedCommand {
impl error::Error for Error {}

impl fmt::Debug for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
// Failed `unwrap()` prints Debug representation, but the default debug format lacks helpful instructions for the end users
<Error as fmt::Display>::fmt(self, f)
}
}

impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> Result<(), fmt::Error> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> Result<(), fmt::Error> {
match *self {
Error::EnvNoPkgConfig(ref name) => write!(f, "Aborted because {} is set", name),
Error::CrossCompilation => f.write_str(
Expand Down Expand Up @@ -407,7 +407,7 @@ impl fmt::Display for Error {
}
}

fn format_output(output: &Output, f: &mut fmt::Formatter) -> fmt::Result {
fn format_output(output: &Output, f: &mut fmt::Formatter<'_>) -> fmt::Result {
let stdout = String::from_utf8_lossy(&output.stdout);
if !stdout.is_empty() {
write!(f, "\n--- stdout\n{}", stdout)?;
Expand Down
5 changes: 1 addition & 4 deletions tests/test.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
extern crate pkg_config;
#[macro_use]
extern crate lazy_static;

use lazy_static::lazy_static;
use pkg_config::Error;
use std::env;
use std::path::PathBuf;
Expand Down

0 comments on commit 02f7519

Please sign in to comment.