From 7a918277cf30759ac9dfbf1587391b498b8099cd Mon Sep 17 00:00:00 2001 From: Rob Tsuk Date: Tue, 13 Mar 2018 16:03:30 -0700 Subject: [PATCH] Return errors instead of ignoring them --- src/cargo/ops/cargo_rustc/output_depinfo.rs | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/src/cargo/ops/cargo_rustc/output_depinfo.rs b/src/cargo/ops/cargo_rustc/output_depinfo.rs index ef1a90242..13f82f2b1 100644 --- a/src/cargo/ops/cargo_rustc/output_depinfo.rs +++ b/src/cargo/ops/cargo_rustc/output_depinfo.rs @@ -71,17 +71,12 @@ pub fn output_depinfo<'a, 'b>(context: &mut Context<'a, 'b>, unit: &Unit<'a>) -> let mut visited = HashSet::new(); let success = add_deps_for_unit(&mut deps, context, unit, &mut visited).is_ok(); let basedir_string; - let basedir = match context.config.get_string("dep-info-basedir") { - Ok(config) => { - match config { - Some(value) => { - basedir_string = value.val; - Some(basedir_string.as_str()) - } - None => None, - } - }, - _ => None + let basedir = match context.config.get_string("dep-info-basedir")? { + Some(value) => { + basedir_string = value.val; + Some(basedir_string.as_str()) + } + None => None, }; for &(_, ref link_dst, _) in context.target_filenames(unit)?.iter() { if let Some(ref link_dst) = *link_dst { -- 2.30.2