Skip to content

Commit

Permalink
Remove unused code for global flag
Browse files Browse the repository at this point in the history
  • Loading branch information
denisidoro committed Apr 5, 2021
1 parent 1948789 commit f966e6b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 8 deletions.
6 changes: 0 additions & 6 deletions src/parser.rs
Expand Up @@ -15,7 +15,6 @@ lazy_static! {
fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
let mut multi = false;
let mut prevent_extra = false;
let mut is_global = false;
let mut opts = FinderOpts::default();

let parts = shellwords::split(text).map_err(|_| anyhow!("Given options are missing a closing quote"))?;
Expand All @@ -33,10 +32,6 @@ fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
prevent_extra = true;
false
}
"--global" => {
is_global = true;
false
}
_ => true,
}
})
Expand Down Expand Up @@ -82,7 +77,6 @@ fn parse_opts(text: &str) -> Result<FinderOpts, Error> {
(false, true) => SuggestionType::SingleSelection,
};
opts.suggestion_type = suggestion_type;
opts.global = is_global;

Ok(opts)
}
Expand Down
2 changes: 0 additions & 2 deletions src/structures/finder.rs
Expand Up @@ -6,7 +6,6 @@ pub struct Opts {
pub preview: Option<String>,
pub preview_window: Option<String>,
pub overrides: Option<String>,
pub global: bool,
pub header_lines: u8,
pub header: Option<String>,
pub suggestion_type: SuggestionType,
Expand All @@ -22,7 +21,6 @@ impl Default for Opts {
filter: None,
preview: None,
preview_window: None,
global: false,
overrides: None,
header_lines: 0,
header: None,
Expand Down

0 comments on commit f966e6b

Please sign in to comment.