@@ -38,7 +38,7 @@ enum TargetArch {
38
38
Arm64ec ,
39
39
}
40
40
impl TargetArch {
41
- /// Parse the TargetArch from a str. Returns `None` if the arch is unrecognized.
41
+ /// Parse the ` TargetArch` from a str. Returns `None` if the arch is unrecognized.
42
42
fn new ( arch : & str ) -> Option < Self > {
43
43
match arch {
44
44
"x64" | "x86_64" => Some ( Self :: X64 ) ,
@@ -155,9 +155,7 @@ pub(crate) fn find_tool_inner(
155
155
env_getter : & dyn EnvGetter ,
156
156
) -> Option < Tool > {
157
157
// We only need the arch.
158
- let Some ( target) = TargetArch :: new ( full_arch) else {
159
- return None ;
160
- } ;
158
+ let target = TargetArch :: new ( full_arch) ?;
161
159
162
160
// Looks like msbuild isn't located in the same location as other tools like
163
161
// cl.exe and lib.exe.
@@ -298,7 +296,7 @@ mod impl_ {
298
296
/// # SAFETY
299
297
///
300
298
/// The caller must ensure that the function signature matches the actual function.
301
- /// The easiest way to do this is to add an entry to windows_sys_no_link.list and use the
299
+ /// The easiest way to do this is to add an entry to ` windows_sys_no_link.list` and use the
302
300
/// generated function for `func_signature`.
303
301
///
304
302
/// The function returned cannot be used after the handle is dropped.
@@ -394,7 +392,7 @@ mod impl_ {
394
392
Some ( target. as_vs_arch ( ) == cmd_target)
395
393
}
396
394
397
- /// Detect the target architecture of `cl.exe`` in the current path, and return `None` if this
395
+ /// Detect the target architecture of `cl.exe` in the current path, and return `None` if this
398
396
/// fails for any reason.
399
397
fn vscmd_target_cl ( env_getter : & dyn EnvGetter ) -> Option < & ' static str > {
400
398
let cl_exe = env_getter. get_env ( "PATH" ) . and_then ( |path| {
0 commit comments