File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,5 @@ version = "0.1.0"
4
4
authors = [" Dustin Knopoff <dustinknopoff@gmail.com>" ]
5
5
6
6
[dependencies ]
7
- colored = " 1.6"
7
+ colored = " 1.6"
8
+ dirs = " 1.0.4"
Original file line number Diff line number Diff line change 44
44
//! These can be modifed in the code to your preference.
45
45
//!
46
46
extern crate colored;
47
+ extern crate dirs;
47
48
48
49
use colored:: * ;
49
50
use std:: collections:: HashMap ;
@@ -181,7 +182,9 @@ impl AllDocs {
181
182
///
182
183
/// A final `Vec` of the collected comment strings is returned.
183
184
pub fn get_info ( ) -> Vec < Vec < String > > {
184
- let f = File :: open ( "/Users/Dustin/.zshrc" ) . unwrap ( ) ;
185
+ let mut p = dirs:: home_dir ( ) . unwrap ( ) ;
186
+ p. push ( ".zshrc" ) ;
187
+ let f = File :: open ( & p) . unwrap ( ) ;
185
188
let f = BufReader :: new ( f) ;
186
189
let mut result: Vec < Vec < String > > = Vec :: new ( ) ;
187
190
result. push ( Vec :: new ( ) ) ;
You can’t perform that action at this time.
0 commit comments