We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Option<Option<_>>
1 parent 2e7eb85 commit 28aed81Copy full SHA for 28aed81
1 file changed
compiler/rustc_target/src/spec/mod.rs
@@ -1446,8 +1446,8 @@ impl Target {
1446
1447
let get_req_field = |name: &str| {
1448
obj.find(name)
1449
- .map(|s| s.as_string())
1450
- .and_then(|os| os.map(|s| s.to_string()))
+ .and_then(Json::as_string)
+ .map(str::to_string)
1451
.ok_or_else(|| format!("Field {} in target specification is required", name))
1452
};
1453
0 commit comments