diff options
author | Matan Kushner <hello@matchai.me> | 2019-05-09 23:51:50 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-09 23:51:50 -0400 |
commit | 8b5055d5106da402f9a132f0ed21571ef98b8ac2 (patch) | |
tree | d5d83454742235f44b183b932355189983ba074c /src/modules/directory.rs | |
parent | c6ee5c6ac16d360ab1a44d097c91fe9f98f20f85 (diff) |
Parallelize prompt modules (#46)
Diffstat (limited to 'src/modules/directory.rs')
-rw-r--r-- | src/modules/directory.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/directory.rs b/src/modules/directory.rs index a85287a67..e0f4a9e12 100644 --- a/src/modules/directory.rs +++ b/src/modules/directory.rs @@ -23,9 +23,8 @@ pub fn segment(context: &Context) -> Option<Module> { let current_dir = &context.current_dir; let dir_string; - if let Some(repo) = &context.repository { + if let Some(repo_root) = &context.repo_root { // Contract the path to the git repo root - let repo_root = repo.workdir().unwrap(); let repo_folder_name = repo_root.file_name().unwrap().to_str().unwrap(); dir_string = contract_path(¤t_dir, repo_root, repo_folder_name); |