Skip to content

Commit ef06b9a

Browse files
committed
Fix 2018 edition errors
1 parent c8b5541 commit ef06b9a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -514,15 +514,15 @@ impl Options {
514514

515515
/// Derive a custom formatted message from a set of options. The formatted options provided to
516516
/// a closure as an iterator.
517-
pub fn usage_with_format<F: FnMut(&mut Iterator<Item = String>) -> String>(
517+
pub fn usage_with_format<F: FnMut(&mut dyn Iterator<Item = String>) -> String>(
518518
&self,
519519
mut formatter: F,
520520
) -> String {
521521
formatter(&mut self.usage_items())
522522
}
523523

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

528528
let any_short = self.grps.iter().any(|optref| !optref.short_name.is_empty());
@@ -938,7 +938,7 @@ fn find_opt(opts: &[Opt], nm: &Name) -> Option<usize> {
938938
}
939939

940940
impl fmt::Display for Fail {
941-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
941+
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
942942
match *self {
943943
ArgumentMissing(ref nm) => write!(f, "Argument to option '{}' missing", *nm),
944944
UnrecognizedOption(ref nm) => write!(f, "Unrecognized option: '{}'", *nm),

0 commit comments

Comments
 (0)