Converted to sqlez, so much nicer
This commit is contained in:
@@ -7,10 +7,8 @@ const TEST_FILE: &'static str = "test-db.db";
|
||||
fn main() -> anyhow::Result<()> {
|
||||
env_logger::init();
|
||||
|
||||
let db = db::Db::open_in_memory();
|
||||
if db.real().is_none() {
|
||||
return Err(anyhow::anyhow!("Migrations failed"));
|
||||
}
|
||||
let db = db::Db::open_in_memory("db");
|
||||
|
||||
let file = Path::new(TEST_FILE);
|
||||
|
||||
let f = File::create(file)?;
|
||||
@@ -21,21 +19,21 @@ fn main() -> anyhow::Result<()> {
|
||||
let workspace_3 = db.workspace_for_roots(&["/tmp3", "/tmp2"]);
|
||||
|
||||
db.save_dock_pane(
|
||||
workspace_1.workspace_id,
|
||||
&workspace_1.workspace_id,
|
||||
&SerializedDockPane {
|
||||
anchor_position: DockAnchor::Expanded,
|
||||
visible: true,
|
||||
},
|
||||
);
|
||||
db.save_dock_pane(
|
||||
workspace_2.workspace_id,
|
||||
&workspace_2.workspace_id,
|
||||
&SerializedDockPane {
|
||||
anchor_position: DockAnchor::Bottom,
|
||||
visible: true,
|
||||
},
|
||||
);
|
||||
db.save_dock_pane(
|
||||
workspace_3.workspace_id,
|
||||
&workspace_3.workspace_id,
|
||||
&SerializedDockPane {
|
||||
anchor_position: DockAnchor::Right,
|
||||
visible: false,
|
||||
|
||||
@@ -4,10 +4,8 @@ const TEST_FILE: &'static str = "test-db.db";
|
||||
|
||||
fn main() -> anyhow::Result<()> {
|
||||
env_logger::init();
|
||||
let db = db::Db::open_in_memory();
|
||||
if db.real().is_none() {
|
||||
return Err(anyhow::anyhow!("Migrations failed"));
|
||||
}
|
||||
let db = db::Db::open_in_memory("db");
|
||||
|
||||
let file = Path::new(TEST_FILE);
|
||||
|
||||
let f = File::create(file)?;
|
||||
|
||||
Reference in New Issue
Block a user