瀏覽代碼

fmt

master
Dylan Baker 5 年之前
父節點
當前提交
dfcf82d5b9
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      src/main.rs

+ 3
- 3
src/main.rs 查看文件

@@ -55,9 +55,9 @@ fn render_post_listing(cwd: &path::PathBuf, layout: &str, posts: &Vec<Post>) {
55 55
 }
56 56
 
57 57
 fn main() {
58
-    let cwd = env::current_dir()
59
-        .expect("Couldn't read current directory");
60
-    let layout = fs::read_to_string(cwd.join("templates").join("layout.html")).expect("Couldn't find layout template");
58
+    let cwd = env::current_dir().expect("Couldn't read current directory");
59
+    let layout = fs::read_to_string(&cwd.join("templates").join("layout.html"))
60
+        .expect("Couldn't find layout template");
61 61
     let post_paths = read_posts_dir(&cwd.join("posts"));
62 62
     let mut posts: Vec<Post> = vec![];
63 63
     for path in post_paths {

Loading…
取消
儲存