Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

history: Fix required feature set of serde dependency #357

Merged
merged 2 commits into from
Jul 23, 2023
Merged
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
3 changes: 1 addition & 2 deletions crates/history/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ categories = ["api-bindings", "history", "wasm"]
wasm-bindgen = "0.2"
gloo-utils = { version = "0.1.7", path = "../utils" }
gloo-events = { version = "0.1.0", path = "../events" }
serde = "1"
serde = { version = "1", features = ["derive"] }
serde-wasm-bindgen = "0.5.0"
serde_urlencoded = { version = "0.7", optional = true }
thiserror = { version = "1.0", optional = true }
Expand All @@ -30,7 +30,6 @@ features = [

[dev-dependencies]
wasm-bindgen-test = "0.3"
serde = { version = "1", features = ["derive"] }
gloo-timers = { version = "0.2.6", features = ["futures"], path = "../timers" }

[features]
Expand Down
4 changes: 2 additions & 2 deletions crates/history/src/any.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ impl History for AnyHistory {
}
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand All @@ -123,7 +123,7 @@ impl History for AnyHistory {
}
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down
4 changes: 2 additions & 2 deletions crates/history/src/browser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ impl History for BrowserHistory {
Ok(())
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down Expand Up @@ -178,7 +178,7 @@ impl History for BrowserHistory {
Ok(())
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down
4 changes: 2 additions & 2 deletions crates/history/src/hash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ impl History for HashHistory {
Ok(())
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand All @@ -160,7 +160,7 @@ impl History for HashHistory {
Ok(())
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down
4 changes: 2 additions & 2 deletions crates/history/src/history.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ pub trait History: Clone + PartialEq {
Q: Serialize;

/// Same as `.push_with_state()` but affix the queries to the end of the route.
#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand All @@ -83,7 +83,7 @@ pub trait History: Clone + PartialEq {
T: 'static;

/// Same as `.replace_with_state()` but affix the queries to the end of the route.
#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down
4 changes: 2 additions & 2 deletions crates/history/src/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ impl History for MemoryHistory {
Ok(())
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn push_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down Expand Up @@ -299,7 +299,7 @@ impl History for MemoryHistory {
Ok(())
}

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
fn replace_with_query_and_state<'a, Q, T>(
&self,
route: impl Into<Cow<'a, str>>,
Expand Down
4 changes: 2 additions & 2 deletions crates/history/tests/browser_history_feat_serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use wasm_bindgen_test::wasm_bindgen_test_configure;

wasm_bindgen_test_configure!(run_in_browser);

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
mod utils;

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
mod feat_serialize {
use super::*;

Expand Down
4 changes: 2 additions & 2 deletions crates/history/tests/hash_history_feat_serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ use wasm_bindgen_test::wasm_bindgen_test_configure;

wasm_bindgen_test_configure!(run_in_browser);

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
mod utils;

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
mod feat_serialize {
use super::*;

Expand Down
2 changes: 1 addition & 1 deletion crates/history/tests/memory_history_feat_serialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use wasm_bindgen_test::wasm_bindgen_test_configure;

wasm_bindgen_test_configure!(run_in_browser);

#[cfg(all(feature = "query"))]
#[cfg(feature = "query")]
mod feat_serialize {
use wasm_bindgen_test::wasm_bindgen_test as test;

Expand Down