Browse Source

chore(examples): simplify streaming example code, closes #5670

Lucas Nogueira 2 years ago
parent
commit
50fbd49273
1 changed files with 1 additions and 4 deletions
  1. 1 4
      examples/streaming/main.rs

+ 1 - 4
examples/streaming/main.rs

@@ -43,10 +43,7 @@ fn main() {
     .register_uri_scheme_protocol("stream", move |_app, request| {
       // prepare our response
       let mut response = ResponseBuilder::new();
-      // get the wanted path
-      #[cfg(target_os = "windows")]
-      let path = request.uri().strip_prefix("stream://localhost/").unwrap();
-      #[cfg(not(target_os = "windows"))]
+      // get the file path
       let path = request.uri().strip_prefix("stream://localhost/").unwrap();
       let path = percent_encoding::percent_decode(path.as_bytes())
         .decode_utf8_lossy()