mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-23 04:33:06 +00:00
fix: webconfig should take &mut self
This commit is contained in:
parent
a239d2ba6a
commit
ae676d9d81
1 changed files with 3 additions and 3 deletions
|
@ -30,7 +30,7 @@ impl WebConfig {
|
|||
/// work and suspended nodes.
|
||||
///
|
||||
/// Dioxus will load up all the elements with the `dio_el` data attribute into memory when the page is loaded.
|
||||
pub fn hydrate(mut self, f: bool) -> Self {
|
||||
pub fn hydrate(&mut self, f: bool) -> &mut Self {
|
||||
self.hydrate = f;
|
||||
self
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ impl WebConfig {
|
|||
/// Set the name of the element that Dioxus will use as the root.
|
||||
///
|
||||
/// This is akint to calling React.render() on the element with the specified name.
|
||||
pub fn rootname(mut self, name: impl Into<String>) -> Self {
|
||||
pub fn rootname(&mut self, name: impl Into<String>) -> &mut Self {
|
||||
self.rootname = name.into();
|
||||
self
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ impl WebConfig {
|
|||
/// Set the name of the element that Dioxus will use as the root.
|
||||
///
|
||||
/// This is akint to calling React.render() on the element with the specified name.
|
||||
pub fn with_string_cache(mut self, cache: Vec<String>) -> Self {
|
||||
pub fn with_string_cache(&mut self, cache: Vec<String>) -> &mut Self {
|
||||
self.cached_strings = cache;
|
||||
self
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue