-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use crate::interface::{DarwinArgs, DarwinRebuildArgs, DarwinReplArgs, DarwinSubcommand}; | ||
use crate::Result; | ||
|
||
impl DarwinArgs { | ||
pub fn run(self) -> Result<()> { | ||
use DarwinRebuildVariant::*; | ||
match self.subcommand { | ||
DarwinSubcommand::Switch(args) => args.rebuild(Switch), | ||
DarwinSubcommand::Build(args) => args.rebuild(Build), | ||
DarwinSubcommand::Repl(args) => args.run(), | ||
} | ||
} | ||
} | ||
|
||
enum DarwinRebuildVariant { | ||
Switch, | ||
Build, | ||
} | ||
|
||
impl DarwinRebuildArgs { | ||
fn rebuild(self, _variant: DarwinRebuildVariant) -> Result<()> { | ||
todo!(); | ||
} | ||
} | ||
|
||
impl DarwinReplArgs { | ||
fn run(self) -> Result<()> { | ||
todo!(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
mod clean; | ||
mod commands; | ||
mod completion; | ||
mod darwin; | ||
mod home; | ||
mod installable; | ||
mod interface; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters