diff --git a/packages/html/Cargo.toml b/packages/html/Cargo.toml
index da57aef11..9bcdff30a 100644
--- a/packages/html/Cargo.toml
+++ b/packages/html/Cargo.toml
@@ -67,7 +67,7 @@ tokio = { workspace = true, features = ["time"] }
manganis = { workspace = true }
[features]
-default = ["serialize", "mounted", "document", "file-engine"]
+default = ["serialize", "mounted", "document", "file_engine"]
serialize = [
"dep:serde",
"dep:serde_json",
@@ -88,7 +88,7 @@ document = [
"dep:serde",
"dep:serde_json"
]
-file-engine = [
+file_engine = [
"dep:async-trait",
"dep:js-sys",
"web-sys?/File",
@@ -96,7 +96,7 @@ file-engine = [
"web-sys?/FileReader"
]
wasm-bind = ["dep:web-sys", "dep:wasm-bindgen", "dep:wasm-bindgen-futures"]
-native-bind = ["dep:tokio", "file-engine"]
+native-bind = ["dep:tokio", "file_engine"]
hot-reload-context = ["dep:dioxus-rsx"]
html-to-rsx = []
diff --git a/packages/html/src/events/drag.rs b/packages/html/src/events/drag.rs
index 18df85c44..63cdffad8 100644
--- a/packages/html/src/events/drag.rs
+++ b/packages/html/src/events/drag.rs
@@ -59,7 +59,7 @@ impl DragData {
}
impl crate::HasFileData for DragData {
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
fn files(&self) -> Option> {
self.inner.files()
}
@@ -112,7 +112,7 @@ impl PointerInteraction for DragData {
pub struct SerializedDragData {
pub mouse: crate::point_interaction::SerializedPointInteraction,
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
#[serde(default)]
files: Option,
}
@@ -122,7 +122,7 @@ impl SerializedDragData {
fn new(drag: &DragData) -> Self {
Self {
mouse: crate::point_interaction::SerializedPointInteraction::from(drag),
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
files: None,
}
}
@@ -137,7 +137,7 @@ impl HasDragData for SerializedDragData {
#[cfg(feature = "serialize")]
impl crate::file_data::HasFileData for SerializedDragData {
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
fn files(&self) -> Option> {
self.files
.as_ref()
diff --git a/packages/html/src/events/form.rs b/packages/html/src/events/form.rs
index 170adef7e..feaadffe6 100644
--- a/packages/html/src/events/form.rs
+++ b/packages/html/src/events/form.rs
@@ -105,7 +105,7 @@ impl FormData {
}
/// Get the files of the form event
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
pub fn files(&self) -> Option> {
self.inner.files()
}
@@ -177,7 +177,7 @@ pub struct SerializedFormData {
#[serde(default)]
valid: bool,
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
#[serde(default)]
files: Option,
}
@@ -190,12 +190,12 @@ impl SerializedFormData {
value,
values,
valid: true,
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
files: None,
}
}
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
/// Add files to the serialized form data object
pub fn with_files(mut self, files: crate::file_data::SerializedFileEngine) -> Self {
self.files = Some(files);
@@ -208,7 +208,7 @@ impl SerializedFormData {
value: data.value(),
values: data.values(),
valid: data.valid(),
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
files: {
match data.files() {
Some(files) => {
@@ -234,7 +234,7 @@ impl SerializedFormData {
value: data.value(),
values: data.values(),
valid: data.valid(),
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
files: None,
}
}
@@ -261,7 +261,7 @@ impl HasFormData for SerializedFormData {
#[cfg(feature = "serialize")]
impl HasFileData for SerializedFormData {
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
fn files(&self) -> Option> {
self.files
.as_ref()
@@ -269,7 +269,7 @@ impl HasFileData for SerializedFormData {
}
}
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
impl HasFileData for FormData {
fn files(&self) -> Option> {
self.inner.files()
diff --git a/packages/html/src/file_data.rs b/packages/html/src/file_data.rs
index 3c6d4fe67..4b74edf44 100644
--- a/packages/html/src/file_data.rs
+++ b/packages/html/src/file_data.rs
@@ -2,14 +2,14 @@ pub trait HasFileData: std::any::Any {
// NOTE: The methods of this trait are config'ed out instead of the trait
// itself because several other traits inherit from this trait and there isn't a clean way to
// conditionally inherit from a trait based on a config.
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
fn files(&self) -> Option> {
None
}
}
#[cfg(feature = "serialize")]
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
/// A file engine that serializes files to bytes
#[derive(serde::Serialize, serde::Deserialize, Debug, PartialEq, Clone)]
pub struct SerializedFileEngine {
@@ -17,7 +17,7 @@ pub struct SerializedFileEngine {
}
#[cfg(feature = "serialize")]
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
#[async_trait::async_trait(?Send)]
impl FileEngine for SerializedFileEngine {
fn files(&self) -> Vec {
@@ -46,7 +46,7 @@ impl FileEngine for SerializedFileEngine {
}
}
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
#[async_trait::async_trait(?Send)]
pub trait FileEngine {
// get a list of file names
diff --git a/packages/html/src/native_bind/native_file_engine.rs b/packages/html/src/native_bind/native_file_engine.rs
index 1c6ccef99..98893ced6 100644
--- a/packages/html/src/native_bind/native_file_engine.rs
+++ b/packages/html/src/native_bind/native_file_engine.rs
@@ -16,7 +16,7 @@ impl NativeFileEngine {
}
}
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
#[async_trait::async_trait(?Send)]
impl FileEngine for NativeFileEngine {
fn files(&self) -> Vec {
diff --git a/packages/html/src/web_sys_bind/events.rs b/packages/html/src/web_sys_bind/events.rs
index 58e39cc11..2be499fdd 100644
--- a/packages/html/src/web_sys_bind/events.rs
+++ b/packages/html/src/web_sys_bind/events.rs
@@ -658,7 +658,7 @@ impl HasMediaData for web_sys::Event {
}
impl HasFileData for web_sys::Event {
- #[cfg(feature = "file-engine")]
+ #[cfg(feature = "file_engine")]
fn files(&self) -> Option> {
let files = self
.dyn_ref()
diff --git a/packages/html/src/web_sys_bind/mod.rs b/packages/html/src/web_sys_bind/mod.rs
index 1e34a04ae..4ef737d43 100644
--- a/packages/html/src/web_sys_bind/mod.rs
+++ b/packages/html/src/web_sys_bind/mod.rs
@@ -1,5 +1,5 @@
mod events;
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
mod file_engine;
-#[cfg(feature = "file-engine")]
+#[cfg(feature = "file_engine")]
pub use file_engine::*;
diff --git a/packages/web/Cargo.toml b/packages/web/Cargo.toml
index 21858ef66..c1abecc35 100644
--- a/packages/web/Cargo.toml
+++ b/packages/web/Cargo.toml
@@ -64,7 +64,7 @@ panic_hook = ["dep:console_error_panic_hook"]
hydrate = ["web-sys/Comment", "ciborium", "dep:serde"]
mounted = ["web-sys/Element", "dioxus-html/mounted"]
file_engine = [
- "dioxus-html/file-engine",
+ "dioxus-html/file_engine",
]
devtools = ["web-sys/MessageEvent", "web-sys/WebSocket", "web-sys/Location", "dep:serde_json", "dep:serde", "dioxus-core/serialize"]
document = ["dioxus-html/document", "dep:serde-wasm-bindgen", "dep:serde_json", "dep:serde"]