move all deps to lib.rs

This commit is contained in:
Nikita Galaiko 2023-08-03 09:16:52 +02:00
parent f2282b5751
commit 25ebce2270
3 changed files with 8 additions and 32 deletions

4
butler/Cargo.lock generated
View File

@ -4210,9 +4210,9 @@ dependencies = [
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.103" version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b" checksum = "076066c5f1078eac5b722a31827a8832fe108bed65dfa75e233c89f8206e976c"
dependencies = [ dependencies = [
"itoa 1.0.9", "itoa 1.0.9",
"ryu", "ryu",

View File

@ -13,12 +13,9 @@ impl super::RunCommand for Branches {
fn run(self) -> Result<()> { fn run(self) -> Result<()> {
let app = App::new().context("Failed to create app")?; let app = App::new().context("Failed to create app")?;
let branches = virtual_branches::list_virtual_branches( let branches =
app.gb_repository(), virtual_branches::list_virtual_branches(app.gb_repository(), &app.project_repository())
&app.project_repository(), .context("failed to list branches")?;
true,
)
.context("failed to list branches")?;
for branch in branches { for branch in branches {
println!("{}", branch.id.red()); println!("{}", branch.id.red());

View File

@ -1,27 +1,4 @@
#[macro_use(defer)]
extern crate scopeguard;
mod app;
mod assets; mod assets;
mod bookmarks;
mod database;
mod dedup;
mod deltas;
mod events;
mod files;
mod fs;
mod gb_repository;
mod project_repository;
mod projects;
mod pty;
mod reader;
mod search;
mod sessions;
mod storage;
mod users;
mod virtual_branches;
mod watcher;
mod writer;
mod zip; mod zip;
#[macro_use] #[macro_use]
@ -40,7 +17,9 @@ use tauri_plugin_log::{
use thiserror::Error; use thiserror::Error;
use timed::timed; use timed::timed;
use crate::project_repository::{activity, branch}; use git_butler_tauri::*;
use project_repository::{activity, branch};
#[derive(Debug, Error)] #[derive(Debug, Error)]
pub enum Error { pub enum Error {