mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 17:15:28 +00:00
use struct constructor
This commit is contained in:
parent
08db41b927
commit
80fecec656
2 changed files with 8 additions and 2 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
|
|
||||||
pub struct Browser {
|
pub struct Browser {
|
||||||
pub connection: Arc<sqlite::Connection>,
|
connection: Arc<sqlite::Connection>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Browser {
|
impl Browser {
|
||||||
|
|
@ -9,3 +9,9 @@ impl Browser {
|
||||||
fn save(&self) {}
|
fn save(&self) {}
|
||||||
fn restore(&self) {}
|
fn restore(&self) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn new(connection: Arc<sqlite::Connection>) -> Browser {
|
||||||
|
let this = Browser { connection };
|
||||||
|
this.init();
|
||||||
|
this
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ pub fn new(
|
||||||
|
|
||||||
// Done
|
// Done
|
||||||
Browser {
|
Browser {
|
||||||
db: db::Browser { connection },
|
db: db::new(connection),
|
||||||
widget,
|
widget,
|
||||||
header,
|
header,
|
||||||
main,
|
main,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue