Skip to content

Commit

Permalink
Add derive debug, clone for FormData and File
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ardi committed Sep 30, 2023
1 parent 289132d commit 7494fe3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion worker/src/formdata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ use wasm_bindgen::JsCast;
use wasm_bindgen_futures::JsFuture;

/// Representing the options any FormData value can be, a field or a file.
#[derive(Debug, Clone)]
pub enum FormEntry {
Field(String),
File(File),
}

/// A [FormData](https://developer.mozilla.org/en-US/docs/Web/API/FormData) representation of the
/// request body, providing access to form encoded fields and files.
#[derive(Debug)]
Expand Down Expand Up @@ -112,6 +112,7 @@ impl From<HashMap<&dyn AsRef<&str>, &dyn AsRef<&str>>> for FormData {

/// A [File](https://developer.mozilla.org/en-US/docs/Web/API/File) representation used with
/// `FormData`.
#[derive(Debug, Clone)]
pub struct File(web_sys::File);

impl File {
Expand Down

0 comments on commit 7494fe3

Please sign in to comment.