From f2de0611ff3470fc097244dc099b8ba68ca24c27 Mon Sep 17 00:00:00 2001 From: Muhammad Hamza Date: Fri, 7 Jan 2022 19:09:23 +0500 Subject: [PATCH] impl Clone and PartialEq --- crates/file/src/blob.rs | 4 ++-- crates/file/src/file_list.rs | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/file/src/blob.rs b/crates/file/src/blob.rs index 9dda6352..7fb3a744 100644 --- a/crates/file/src/blob.rs +++ b/crates/file/src/blob.rs @@ -66,7 +66,7 @@ impl BlobContents for Blob { /// /// `Blob`s can be created directly from `&str`, `&[u8]`, and `js_sys::ArrayBuffer`s using the /// `Blob::new` or `Blob::new_with_options` functions. -#[derive(Debug)] +#[derive(Debug, Clone, PartialEq)] pub struct Blob { inner: web_sys::Blob, } @@ -163,7 +163,7 @@ impl AsRef for Blob { } /// A [`File`](https://developer.mozilla.org/en-US/docs/Web/API/File). -#[derive(Debug)] +#[derive(Debug, Clone, PartialEq)] pub struct File { // the trick here is that we know the contents of `inner` are a file, even though that type // information is not stored. It is the same trick as is used in `web_sys`. diff --git a/crates/file/src/file_list.rs b/crates/file/src/file_list.rs index 0dd8c1e4..b721923d 100644 --- a/crates/file/src/file_list.rs +++ b/crates/file/src/file_list.rs @@ -2,6 +2,7 @@ use crate::blob::File; use wasm_bindgen::prelude::*; /// A list of files, for example from an ``. +#[derive(Debug, Clone, PartialEq)] pub struct FileList { inner: Vec, }