Johann Woelper 7 년 전
부모
커밋
ed6552c51f
1개의 변경된 파일5개의 추가작업 그리고 4개의 파일을 삭제
  1. 5 4
      src/main.rs

+ 5 - 4
src/main.rs

@@ -22,11 +22,12 @@ fn get() -> String {
 }
 
 #[get("/")]
-fn test() -> String {
+fn test() -> File {
     let mut f = std::fs::File::open("index.html").unwrap();
-    let mut contents = String::new();
-    f.read_to_string(&mut contents).unwrap();
-    contents
+    f
+//     let mut contents = String::new();
+//     f.read_to_string(&mut contents).unwrap();
+//     contents
 }
 
 #[get("/<obj>")]