Skip to content

Commit e7dc344

Browse files
ref: Fix unnecessary_get_then_check clippy lint
Also, remove duplicate unnecessary check. Information about this new lint [here](https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_get_then_check).
1 parent fd80ecb commit e7dc344

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/commands/react_native/xcode.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,15 @@ pub fn execute(matches: &ArgMatches) -> Result<()> {
373373
Ok(Some(plist)) => {
374374
// Successfully discovered and parsed Info.plist
375375
let dist_string = plist.build().to_string();
376-
let release_string = format!("{}@{}+{}", plist.bundle_id(), plist.version(), dist_string);
376+
let release_string = format!(
377+
"{}@{}+{}",
378+
plist.bundle_id(),
379+
plist.version(),
380+
dist_string
381+
);
377382
info!("Parse result from Info.plist: {:?}", &plist);
378383
(Some(dist_string), Some(release_string))
379-
},
384+
}
380385
_ => {
381386
bail!("Info.plist was not found or an parsing error occurred");
382387
}
@@ -556,9 +561,7 @@ pub fn wrap_call() -> Result<()> {
556561
if let (Ok(packager_sourcemap), Ok(mut hermes_sourcemap)) =
557562
(packager_sourcemap_result, hermes_sourcemap_result)
558563
{
559-
if hermes_sourcemap.get("debugId").is_none()
560-
&& hermes_sourcemap.get("debug_id").is_none()
561-
{
564+
if !hermes_sourcemap.contains_key("debug_id") {
562565
if let Some(debug_id) = packager_sourcemap
563566
.get("debugId")
564567
.or_else(|| packager_sourcemap.get("debug_id"))

0 commit comments

Comments
 (0)