chore(examples): simplify streaming example code, closes
@@ -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()
