Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions leptos_config/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,20 +277,16 @@ impl TryFrom<String> for Env {
}
}

/// An enum that can be used to define the websocket protocol Leptos uses for hotreloading
/// Defaults to `ws`.
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq)]
/// An enum that can be used to define the websocket protocol Leptos uses for hotreloading.
#[derive(
Debug, Clone, serde::Serialize, serde::Deserialize, PartialEq, Eq, Default,
)]
pub enum ReloadWSProtocol {
#[default]
WS,
WSS,
}

impl Default for ReloadWSProtocol {
fn default() -> Self {
Self::WS
}
}

fn ws_from_str(input: &str) -> Result<ReloadWSProtocol, LeptosConfigError> {
let sanitized = input.to_lowercase();
match sanitized.as_ref() {
Expand Down
9 changes: 2 additions & 7 deletions tachys/src/view/keyed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -642,18 +642,13 @@ struct DiffOpRemove {
at: usize,
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Default)]
enum DiffOpAddMode {
#[default]
Normal,
Append,
}

impl Default for DiffOpAddMode {
fn default() -> Self {
Self::Normal
}
}

fn apply_diff<T, VFS, V>(
parent: Option<&crate::renderer::types::Element>,
marker: &crate::renderer::types::Placeholder,
Expand Down
Loading