Skip to content

Commit 97dc02b

Browse files
authored
Merge pull request #85 from alexcrichton/fix-build
Fix current build warnings
2 parents 0f67003 + 15fd785 commit 97dc02b

File tree

5 files changed

+18
-54
lines changed

5 files changed

+18
-54
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: CI
2+
on: [push, pull_request]
3+
jobs:
4+
test:
5+
name: Test
6+
runs-on: ubuntu-latest
7+
strategy:
8+
matrix:
9+
rust: [stable, beta, nightly]
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: Install Rust
13+
run: rustup update ${{ matrix.rust }} && rustup default ${{ matrix.rust }}
14+
- run: cargo test
15+
- run: cargo doc

.travis.yml

Lines changed: 0 additions & 22 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@ getopts
33

44
A Rust library for option parsing for CLI utilities.
55

6-
[![Build Status](https://travis-ci.org/rust-lang-nursery/getopts.svg?branch=master)](https://travis-ci.org/rust-lang-nursery/getopts)
7-
8-
[Documentation](https://doc.rust-lang.org/getopts)
6+
[Documentation](https://docs.rs/getopts)
97

108
## Usage
119

@@ -15,13 +13,3 @@ Add this to your `Cargo.toml`:
1513
[dependencies]
1614
getopts = "0.2"
1715
```
18-
19-
and this to your crate root:
20-
21-
```rust
22-
extern crate getopts;
23-
```
24-
25-
## Rust Version Support
26-
27-
The minimum supported Rust version is 1.18.

appveyor.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,15 +503,15 @@ impl Options {
503503

504504
/// Derive a custom formatted message from a set of options. The formatted options provided to
505505
/// a closure as an iterator.
506-
pub fn usage_with_format<F: FnMut(&mut Iterator<Item = String>) -> String>(
506+
pub fn usage_with_format<F: FnMut(&mut dyn Iterator<Item = String>) -> String>(
507507
&self,
508508
mut formatter: F,
509509
) -> String {
510510
formatter(&mut self.usage_items())
511511
}
512512

513513
/// Derive usage items from a set of options.
514-
fn usage_items<'a>(&'a self) -> Box<Iterator<Item = String> + 'a> {
514+
fn usage_items<'a>(&'a self) -> Box<dyn Iterator<Item = String> + 'a> {
515515
let desc_sep = format!("\n{}", repeat(" ").take(24).collect::<String>());
516516

517517
let any_short = self.grps.iter().any(|optref| !optref.short_name.is_empty());

0 commit comments

Comments
 (0)