Johann Woelper %!s(int64=7) %!d(string=hai) anos
pai
achega
ed6552c51f
Modificáronse 1 ficheiros con 5 adicións e 4 borrados
  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>")]