Parcourir la source

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

Lucas Nogueira il y a 2 ans
Parent
commit
50fbd49273
1 fichiers modifiés avec 1 ajouts et 4 suppressions
  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()