Johann Woelper 7 gadi atpakaļ
vecāks
revīzija
ed6552c51f
1 mainītis faili ar 5 papildinājumiem un 4 dzēšanām
  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>")]