diff --git a/src/modules/formatter.rs b/src/modules/formatter.rs index 805135de..f732cb96 100644 --- a/src/modules/formatter.rs +++ b/src/modules/formatter.rs @@ -39,6 +39,12 @@ impl BashFormatter { } } + pub fn as_cmd>(self: &Self) -> T { + match self { + BashFormatter::shfmt => "shfmt".into() + } + } + /// Format code using the formatter pub fn format(self: &Self, code: String) -> String { match self {