Upgrade packer

Summary:
This had collected a bit of dust and we will need to extend this a little for flipper-server.

- Update deps.
- Migrate away from deprecated clap2 model to derive (it's much shorter now and less imperative).
- ~~Some COW changes on how the progress bar crate handles strings.~~ (Reverted as this causes havvoc in `fbsource//third-party/rust`.)
- Upgraded to 2021 Edition.

Reviewed By: nikoant

Differential Revision: D35433571

fbshipit-source-id: ae0a91558610ae46069a5fc5162b524cde759454
This commit is contained in:
Pascal Hartig
2022-04-07 07:40:57 -07:00
committed by Facebook GitHub Bot
parent 9cf630b27b
commit b80766323f
5 changed files with 252 additions and 175 deletions

View File

@@ -5,17 +5,24 @@
* LICENSE file in the root directory of this source tree.
*/
use clap::arg_enum;
use std::fmt::{self, Display};
arg_enum! {
#[derive(Debug, Copy, Clone, PartialEq, Eq, PartialOrd, Ord, serde::Deserialize)]
#[serde(rename_all = "lowercase")]
pub enum Platform {
Mac,
Linux,
Windows
}
#[derive(
Debug,
Copy,
Clone,
PartialEq,
Eq,
PartialOrd,
Ord,
serde::Deserialize,
clap::ArgEnum
)]
#[serde(rename_all = "lowercase")]
pub enum Platform {
Mac,
Linux,
Windows,
}
#[derive(