removed unnecessary mutability for pages and tabs
This commit is contained in:
parent
a9626cda4d
commit
1d62f3810c
|
@ -27,7 +27,7 @@ impl Pages {
|
||||||
impl PagesBuilder {
|
impl PagesBuilder {
|
||||||
|
|
||||||
fn append_page_private(
|
fn append_page_private(
|
||||||
&mut self,
|
&self,
|
||||||
page_name: &str,
|
page_name: &str,
|
||||||
page_title: &str,
|
page_title: &str,
|
||||||
content: &impl IsA<Widget>
|
content: &impl IsA<Widget>
|
||||||
|
@ -36,7 +36,7 @@ impl PagesBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn set_transition(
|
pub fn set_transition(
|
||||||
mut self,
|
self,
|
||||||
type_transition : StackTransitionType,
|
type_transition : StackTransitionType,
|
||||||
duration: u32
|
duration: u32
|
||||||
) -> Self {
|
) -> Self {
|
||||||
|
@ -47,7 +47,7 @@ impl PagesBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_page(
|
pub fn add_page(
|
||||||
mut self,
|
self,
|
||||||
page_name: &str,
|
page_name: &str,
|
||||||
page_title: &str,
|
page_title: &str,
|
||||||
content: &impl IsA<Widget>
|
content: &impl IsA<Widget>
|
||||||
|
@ -57,7 +57,7 @@ impl PagesBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn add_pages(
|
pub fn add_pages(
|
||||||
mut self,
|
self,
|
||||||
pages: Vec<(&str, &str, &impl IsA<Widget>)>,
|
pages: Vec<(&str, &str, &impl IsA<Widget>)>,
|
||||||
) -> Self {
|
) -> Self {
|
||||||
pages.iter()
|
pages.iter()
|
||||||
|
|
|
@ -47,7 +47,7 @@ impl TabsBuilder {
|
||||||
self
|
self
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn build(&mut self, group_name: &str) -> Tabs {
|
pub fn build(&self, group_name: &str) -> Tabs {
|
||||||
let tabs_wrapper = Notebook::builder()
|
let tabs_wrapper = Notebook::builder()
|
||||||
.group_name(group_name)
|
.group_name(group_name)
|
||||||
.build();
|
.build();
|
||||||
|
|
Loading…
Reference in New Issue