From c5aa5c46291a27f69acc920894d43605ceb43eba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ezgi=20=C3=87i=C3=A7ek?= Date: Mon, 12 Aug 2024 02:28:44 -0700 Subject: [PATCH] Create an enum for superconsole interaction toggles Summary: Current implementation of console toggles relies on `char` and display is error-prone (.e.g we forgot to add `x` option to the Help). I initially tried to fix this in D60960924 but then realized that this could happen in the future. Better to make it type-safe so that we get it for free (via `strum::EnumIter`). Also rename `ConsoleInteraction` to `SuperConsoleInteraction` to signify that these only for for superconsole. Reviewed By: stepancheg Differential Revision: D60965981 fbshipit-source-id: e0008b46dd752446b45877e6f0c2acf43f528c7b --- shim/third-party/rust/Cargo.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/shim/third-party/rust/Cargo.toml b/shim/third-party/rust/Cargo.toml index 036742ff95c..9978150dbed 100644 --- a/shim/third-party/rust/Cargo.toml +++ b/shim/third-party/rust/Cargo.toml @@ -182,6 +182,7 @@ smallvec = { version = "1.10", features = ["const_generics", "const_new", "serde static_assertions = "1.1.0" strsim = "0.10.0" structopt = "0.3.23" +strum = { version = "0.26.2", features = ["derive", "strum_macros"] } syn = { version = "2", features = ["extra-traits", "full", "visit"] } syn1 = { package = "syn", version = "1.0.109", features = ["extra-traits", "fold", "full", "visit", "visit-mut"] } synstructure = "0.12"