Browse Source

Make clippy happy

Jonathan Kelley 1 year ago
parent
commit
2e0cded871
2 changed files with 1 additions and 2 deletions
  1. 0 1
      examples/video_stream.rs
  2. 1 1
      packages/desktop/src/webview.rs

+ 0 - 1
examples/video_stream.rs

@@ -3,7 +3,6 @@ use dioxus_desktop::wry::http;
 use dioxus_desktop::wry::http::Response;
 use dioxus_desktop::wry::http::Response;
 use dioxus_desktop::{use_asset_handler, AssetRequest};
 use dioxus_desktop::{use_asset_handler, AssetRequest};
 use http::{header::*, response::Builder as ResponseBuilder, status::StatusCode};
 use http::{header::*, response::Builder as ResponseBuilder, status::StatusCode};
-use std::borrow::Cow;
 use std::{io::SeekFrom, path::PathBuf};
 use std::{io::SeekFrom, path::PathBuf};
 use tokio::io::AsyncReadExt;
 use tokio::io::AsyncReadExt;
 use tokio::io::AsyncSeekExt;
 use tokio::io::AsyncSeekExt;

+ 1 - 1
packages/desktop/src/webview.rs

@@ -72,7 +72,7 @@ impl WebviewInstance {
 
 
             // Otherwise, try to serve an asset, either from the user or the filesystem
             // Otherwise, try to serve an asset, either from the user or the filesystem
             match index_bytes {
             match index_bytes {
-                Some(body) => return responder.respond(body),
+                Some(body) => responder.respond(body),
                 None => {
                 None => {
                     // we need to do this in the context of the dioxus runtime since the user gave us these closures
                     // we need to do this in the context of the dioxus runtime since the user gave us these closures
                     protocol::desktop_handler(
                     protocol::desktop_handler(