use std::fs::File; use std::io; #[route(GET, path = "//")] fn all_level_one(top: &str, file: &str) -> io::Result { let file = format!("static/{}/{}", top, file); File::open(file) } #[route(GET, path = "/")] fn all(file: &str) -> io::Result { let file = format!("static/{}", file); File::open(file) }