Remove double-negative conditionals.
This commit is contained in:
parent
4238d0b639
commit
77eb78a8c5
1 changed files with 6 additions and 6 deletions
|
@ -335,10 +335,10 @@ pub struct RustcDefaultCalls;
|
||||||
fn handle_explain(code: &str,
|
fn handle_explain(code: &str,
|
||||||
descriptions: &diagnostics::registry::Registry,
|
descriptions: &diagnostics::registry::Registry,
|
||||||
output: ErrorOutputType) {
|
output: ErrorOutputType) {
|
||||||
let normalised = if !code.starts_with("E") {
|
let normalised = if code.starts_with("E") {
|
||||||
format!("E{0:0>4}", code)
|
|
||||||
} else {
|
|
||||||
code.to_string()
|
code.to_string()
|
||||||
|
} else {
|
||||||
|
format!("E{0:0>4}", code)
|
||||||
};
|
};
|
||||||
match descriptions.find_description(&normalised) {
|
match descriptions.find_description(&normalised) {
|
||||||
Some(ref description) => {
|
Some(ref description) => {
|
||||||
|
@ -916,10 +916,10 @@ pub fn handle_options(args: &[String]) -> Option<getopts::Matches> {
|
||||||
if opt.stability == OptionStability::Stable {
|
if opt.stability == OptionStability::Stable {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
let opt_name = if !opt.opt_group.long_name.is_empty() {
|
let opt_name = if opt.opt_group.long_name.is_empty() {
|
||||||
&opt.opt_group.long_name
|
|
||||||
} else {
|
|
||||||
&opt.opt_group.short_name
|
&opt.opt_group.short_name
|
||||||
|
} else {
|
||||||
|
&opt.opt_group.long_name
|
||||||
};
|
};
|
||||||
if !matches.opt_present(opt_name) {
|
if !matches.opt_present(opt_name) {
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue