fix: Lazy load git repo and only run module if not disabled (#306)

A couple of optimizations are done in this PR. One, we now will check config ahead of time to see if a module is disabled before running any module code. Also, we won't try to discover a git repository unless the module requests access to it.
This commit is contained in:
Neil Kistner
2019-09-09 18:14:38 -05:00
committed by Matan Kushner
parent dc8409333e
commit 9f70ffb7a7
30 changed files with 111 additions and 177 deletions
+1 -1
View File
@@ -37,10 +37,10 @@ log = "0.4.8"
# battery is optional (on by default) because the crate doesn't currently build for Termux
# see: https://github.com/svartalf/rust-battery/issues/33
battery = { version = "0.7.4", optional = true }
lazy_static = "1.4.0"
path-slash = "0.1.1"
unicode-segmentation = "1.3.0"
gethostname = "0.2.0"
once_cell = "1.1.0"
[dev-dependencies]
tempfile = "3.1.0"