Browse Source

fix merge conflicts for files

Jonathan Kelley 1 year ago
parent
commit
9c4d90350f
3 changed files with 2 additions and 4 deletions
  1. 0 1
      Cargo.toml
  2. 2 1
      examples/file_upload.rs
  3. 0 2
      packages/html/src/events/drag.rs

+ 0 - 1
Cargo.toml

@@ -133,7 +133,6 @@ serde_json = "1.0.79"
 rand = { version = "0.8.4", features = ["small_rng"] }
 tokio = { version = "1.16.1", features = ["full"] }
 reqwest = { version = "0.11.9", features = ["json"] }
-fern = { version = "0.6.0", features = ["colored"] }
 env_logger = "0.10.0"
 simple_logger = "4.0.0"
 thiserror = { workspace = true }

+ 2 - 1
examples/file_upload.rs

@@ -1,4 +1,5 @@
 #![allow(non_snake_case)]
+use dioxus::html::HasFileData;
 use dioxus::prelude::*;
 use tokio::time::sleep;
 
@@ -48,7 +49,7 @@ fn App(cx: Scope) -> Element {
             ondrop: move |evt| {
                 to_owned![files_uploaded];
                 async move {
-                    if let Some(file_engine) = &evt.files {
+                    if let Some(file_engine) = &evt.files() {
                         let files = file_engine.files();
                         for file_name in &files {
                             if let Some(file) = file_engine.read_file_to_string(file_name).await{

+ 0 - 2
packages/html/src/events/drag.rs

@@ -8,8 +8,6 @@ use keyboard_types::Modifiers;
 
 use crate::HasMouseData;
 
-use std::fmt::Debug;
-
 pub type DragEvent = Event<DragData>;
 
 /// The DragEvent interface is a DOM event that represents a drag and drop interaction. The user initiates a drag by