mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 00:55:28 +00:00
use anyhow crate, return id on insert
This commit is contained in:
parent
e859b97d79
commit
5effd63575
42 changed files with 496 additions and 1164 deletions
10
src/app.rs
10
src/app.rs
|
|
@ -1,10 +1,10 @@
|
|||
pub mod browser;
|
||||
mod database;
|
||||
|
||||
use browser::Browser;
|
||||
|
||||
use crate::profile::Profile;
|
||||
use adw::Application;
|
||||
use anyhow::Result;
|
||||
use browser::Browser;
|
||||
use gtk::{
|
||||
glib::ExitCode,
|
||||
prelude::{ActionExt, ApplicationExt, ApplicationExtManual, GtkApplicationExt},
|
||||
|
|
@ -294,11 +294,9 @@ impl App {
|
|||
}
|
||||
|
||||
// Tools
|
||||
fn migrate(tx: &Transaction) -> Result<(), String> {
|
||||
fn migrate(tx: &Transaction) -> Result<()> {
|
||||
// Migrate self components
|
||||
if let Err(e) = database::init(tx) {
|
||||
return Err(e.to_string());
|
||||
}
|
||||
database::init(tx)?;
|
||||
|
||||
// Delegate migration to childs
|
||||
browser::migrate(tx)?;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue