From fee76ca44fb0b603916d8b74d875b6a35d03425d Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Mon, 20 Apr 2020 13:51:18 +0100 Subject: [PATCH] Remove doc-hidden `recursive` option (#225) As the comment mentions, this is used only in CLI interface, so there's no reason for it not to live directly in CLI code. Ref: #220. --- src/lib.rs | 4 ---- src/main.rs | 6 +----- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index e857bba4..e3017d9f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -129,9 +129,6 @@ pub struct Options { /// /// Default: `false` pub pretend: bool, - /// Used only in CLI interface - #[doc(hidden)] - pub recursive: bool, /// Write to output even if there was no improvement in compression. /// /// Default: `false` @@ -282,7 +279,6 @@ impl Default for Options { Options { backup: false, pretend: false, - recursive: false, fix_errors: false, force: false, preserve_attrs: false, diff --git a/src/main.rs b/src/main.rs index 77e50217..dd4bee88 100644 --- a/src/main.rs +++ b/src/main.rs @@ -255,7 +255,7 @@ fn main() { .collect(), &out_dir, &out_file, - opts.recursive, + matches.is_present("recursive"), true, ); @@ -381,10 +381,6 @@ fn parse_opts_into_struct( opts.force = true; } - if matches.is_present("recursive") { - opts.recursive = true; - } - if matches.is_present("fix") { opts.fix_errors = true; }