diff options
Diffstat (limited to 'crates/system_action/src/action.rs')
| -rw-r--r-- | crates/system_action/src/action.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/crates/system_action/src/action.rs b/crates/system_action/src/action.rs index 3ae5711..8a6180a 100644 --- a/crates/system_action/src/action.rs +++ b/crates/system_action/src/action.rs @@ -41,16 +41,18 @@ pub struct ActionContext { impl ActionContext { /// Generate local context pub fn local() -> Self { - let mut ctx = ActionContext::default(); - ctx.local = true; - ctx + ActionContext { + local: true, + ..Default::default() + } } /// Generate remote context pub fn remote() -> Self { - let mut ctx = ActionContext::default(); - ctx.local = false; - ctx + ActionContext { + local: false, + ..Default::default() + } } /// Build connection instance from TcpStream |
