mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-30 20:14:49 +00:00
Merge branch 'bugfix/misc' of github.com:Start9Labs/start-os into bugfix/misc
This commit is contained in:
@@ -58,6 +58,7 @@ pub struct ActionParams {
|
||||
pub action_id: ActionId,
|
||||
#[command(flatten)]
|
||||
#[ts(type = "{ [key: string]: any } | null")]
|
||||
#[serde(default)]
|
||||
pub input: StdinDeserializable<Option<Config>>,
|
||||
}
|
||||
// impl C
|
||||
|
||||
@@ -568,6 +568,14 @@ where
|
||||
|
||||
#[derive(Deserialize, Serialize, TS)]
|
||||
pub struct StdinDeserializable<T>(pub T);
|
||||
impl<T> Default for StdinDeserializable<T>
|
||||
where
|
||||
T: Default,
|
||||
{
|
||||
fn default() -> Self {
|
||||
Self(T::default())
|
||||
}
|
||||
}
|
||||
impl<T> FromArgMatches for StdinDeserializable<T>
|
||||
where
|
||||
T: DeserializeOwned,
|
||||
|
||||
Reference in New Issue
Block a user