Make Platform a newtype

Summary:
Just a bit of extra type safety. The previous diff caused a bit of a regression
by making things stringly-typed.

Reviewed By: lblasa

Differential Revision: D35902107

fbshipit-source-id: a599106f899ec3d205663b5791420aee29f3eeae
This commit is contained in:
Pascal Hartig
2022-04-26 03:29:40 -07:00
committed by Facebook GitHub Bot
parent 3c6a5c58f9
commit bb936aaf0f
2 changed files with 18 additions and 4 deletions

View File

@@ -178,7 +178,7 @@ fn pack_platform_glob(
let full_path = path::Path::new(&base_dir).join(&path);
if !full_path.exists() {
bail!(error::Error::MissingPackFile(
platform.to_string(),
platform.clone(),
pack_type,
full_path,
));
@@ -204,7 +204,7 @@ fn pack_platform_exact(
let full_path = path::Path::new(&base_dir).join(f);
if !full_path.exists() {
bail!(error::Error::MissingPackFile(
platform.to_string(),
platform.clone(),
pack_type,
full_path,
));