Skip to content

Commit

Permalink
Clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisDenton committed Dec 29, 2024
1 parent b5b0074 commit f6f6413
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/windows/find_tools.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ enum TargetArch {
Arm64ec,
}
impl TargetArch {
/// Parse the TargetArch from a str. Returns `None` if the arch is unrecognized.
/// Parse the `TargetArch` from a str. Returns `None` if the arch is unrecognized.
fn new(arch: &str) -> Option<Self> {
match arch {
"x64" | "x86_64" => Some(Self::X64),
Expand Down Expand Up @@ -155,9 +155,7 @@ pub(crate) fn find_tool_inner(
env_getter: &dyn EnvGetter,
) -> Option<Tool> {
// We only need the arch.
let Some(target) = TargetArch::new(full_arch) else {
return None;
};
let target = TargetArch::new(full_arch)?;

// Looks like msbuild isn't located in the same location as other tools like
// cl.exe and lib.exe.
Expand Down Expand Up @@ -298,7 +296,7 @@ mod impl_ {
/// # SAFETY
///
/// The caller must ensure that the function signature matches the actual function.
/// The easiest way to do this is to add an entry to windows_sys_no_link.list and use the
/// The easiest way to do this is to add an entry to `windows_sys_no_link.list` and use the
/// generated function for `func_signature`.
///
/// The function returned cannot be used after the handle is dropped.
Expand Down Expand Up @@ -394,7 +392,7 @@ mod impl_ {
Some(target.as_vs_arch() == cmd_target)
}

/// Detect the target architecture of `cl.exe`` in the current path, and return `None` if this
/// Detect the target architecture of `cl.exe` in the current path, and return `None` if this
/// fails for any reason.
fn vscmd_target_cl(env_getter: &dyn EnvGetter) -> Option<&'static str> {
let cl_exe = env_getter.get_env("PATH").and_then(|path| {
Expand Down

0 comments on commit f6f6413

Please sign in to comment.