From 309301847479403298438d70ce5c3f332da896d4 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 3 Apr 2020 14:02:44 +1100 Subject: [PATCH] Tweak `parse_opt_uint`. Don't set `slot` on failure, like all the other `parse_*` functions. --- src/librustc_session/options.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc_session/options.rs b/src/librustc_session/options.rs index dea7ffd6bbb..2de3bea7086 100644 --- a/src/librustc_session/options.rs +++ b/src/librustc_session/options.rs @@ -421,7 +421,7 @@ fn parse_uint(slot: &mut usize, v: Option<&str>) -> bool { fn parse_opt_uint(slot: &mut Option, v: Option<&str>) -> bool { match v { Some(s) => { *slot = s.parse().ok(); slot.is_some() } - None => { *slot = None; false } + None => false } }