From eb724279da21feca8438a40249d1b2d47e8ca312 Mon Sep 17 00:00:00 2001 From: Nick Young Date: Fri, 6 Sep 2019 02:45:04 +1000 Subject: feat: Adds Git State module for showing "REBASING 2/3", etc. (#276) - Adds the git_state module. - Adds git_state to the default prompt order - Updates the documentation to describe the git_state module --- src/utils.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/utils.rs') diff --git a/src/utils.rs b/src/utils.rs index 4a0337ae6..c873f45aa 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1,8 +1,9 @@ use std::fs::File; use std::io::{Read, Result}; +use std::path::Path; /// Return the string contents of a file -pub fn read_file(file_name: &str) -> Result { +pub fn read_file>(file_name: P) -> Result { let mut file = File::open(file_name)?; let mut data = String::new(); -- cgit v1.2.3