mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
move error handle outside
This commit is contained in:
parent
caee762103
commit
73ab25efdf
2 changed files with 13 additions and 34 deletions
|
|
@ -31,8 +31,11 @@ pub struct App {
|
|||
impl App {
|
||||
// Construct
|
||||
pub fn new(profile_database_connection: Arc<Connection>) -> Self {
|
||||
// Init app database model
|
||||
let database = Arc::new(Database::init(profile_database_connection));
|
||||
// Init database model
|
||||
let database = match Database::init(profile_database_connection) {
|
||||
Ok(database) => Arc::new(database),
|
||||
Err(e) => panic!("{e}"), // @TODO
|
||||
};
|
||||
|
||||
// Init actions
|
||||
let action_debug = Action::new("win", true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue