From 4b34c9f8e1ddd03f8dc0b5cded8656ae00ac6e0e Mon Sep 17 00:00:00 2001 From: Tim de Jager Date: Mon, 3 Apr 2023 09:15:51 +0200 Subject: [PATCH] fix: compile error --- .../rattler_conda_types/src/repo_data/mod.rs | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/crates/rattler_conda_types/src/repo_data/mod.rs b/crates/rattler_conda_types/src/repo_data/mod.rs index 01811a934..289482541 100644 --- a/crates/rattler_conda_types/src/repo_data/mod.rs +++ b/crates/rattler_conda_types/src/repo_data/mod.rs @@ -213,35 +213,35 @@ fn determine_subdir( let plat = match platform.as_ref() { "linux" => { match arch.as_ref() { - "x86" => Platform::Linux32, - "x86_64" => Platform::Linux64, - "aarch64" => Platform::LinuxAarch64, - "armv61" => Platform::LinuxArmV6l, - "armv71" => Platform::LinuxArmV7l, - "ppc64le" => Platform::LinuxPpc64le, - "ppc64" => Platform::LinuxPpc64, - "s390x" => Platform::LinuxS390X, + "x86" => Ok(Platform::Linux32), + "x86_64" => Ok(Platform::Linux64), + "aarch64" => Ok(Platform::LinuxAarch64), + "armv61" => Ok(Platform::LinuxArmV6l), + "armv71" => Ok(Platform::LinuxArmV7l), + "ppc64le" => Ok(Platform::LinuxPpc64le), + "ppc64" => Ok(Platform::LinuxPpc64), + "s390x" => Ok(Platform::LinuxS390X), _ => Err(ConvertSubdirError::NoKnownCombination { platform, arch }), } }, "osx" => { match arch.as_ref() { - "x86_64" => Platform::Osx64, - "arm64" => Platform::OsxArm64, + "x86_64" => Ok(Platform::Osx64), + "arm64" => Ok(Platform::OsxArm64), _ => Err(ConvertSubdirError::NoKnownCombination { platform, arch }), } }, "windows" => { match arch.as_ref() { - "x86" => Platform::Win32, - "x86_64" => Platform::Win64, - "arm64" => Platform::WinArm64, + "x86" => Ok(Platform::Win32), + "x86_64" => Ok(Platform::Win64), + "arm64" => Ok(Platform::WinArm64), _ => Err(ConvertSubdirError::NoKnownCombination { platform, arch }), } } _ => Err(ConvertSubdirError::NoKnownCombination { platform, arch }), - }; + }?; // Convert back to Platform string which should correspond to known subdirs Ok(plat.to_string()) }