take &Path instead of PathBuf

This commit is contained in:
Muhammad Mominul Huque 2018-10-16 15:36:53 +06:00
parent 9d9e637ef3
commit 2c4cfb297e
No known key found for this signature in database
GPG key ID: 9D472E8B36098956
3 changed files with 5 additions and 5 deletions

View file

@ -77,7 +77,7 @@ pub fn update(path: &Path, contents: &str, verify: bool) -> Result<()> {
Ok(())
}
pub fn render_template(template: PathBuf) -> Result<String> {
pub fn render_template(template: &Path) -> Result<String> {
let grammar: ron::value::Value = {
let text = fs::read_to_string(project_root().join(GRAMMAR))?;
ron::de::from_str(&text)?