diff options
author | Ivan Tham <pickfire@riseup.net> | 2019-08-27 02:47:34 +0800 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-08-26 14:47:34 -0400 |
commit | cdea40158916e7f0f3cf2fff80a8a555ba2a6ce7 (patch) | |
tree | 59c2ff8837def3f94907e9ece2e2db162924530f /src | |
parent | 0fa862a2e9b2e41656265dfaa0a4c57a2ab36180 (diff) |
refactor: just match enum (#236)
Remove forced unwrap since match is already exhausted
Diffstat (limited to 'src')
-rw-r--r-- | src/init.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/init.rs b/src/init.rs index 398538f73..fed4be2ff 100644 --- a/src/init.rs +++ b/src/init.rs @@ -63,15 +63,13 @@ pub fn init_stub(shell_name: &str) -> io::Result<()> { ); None } - _ => { - /* Calling unwrap() here is fine because the None case will have - already matched on the previous arm */ + Some(shell_basename) => { println!( "printf \"\\n{0} is not yet supported by starship.\\n\ For the time being, we support bash, zsh, and fish.\\n\ Please open an issue in the starship repo if you would like to \ see support for {0}:\\nhttps://github.com/starship/starship/issues/new\"\\n\\n", - shell_basename.unwrap() + shell_basename ); None } |