move reader writer to root

This commit is contained in:
Nikita Galaiko 2023-05-16 09:55:05 +02:00
parent a1a3aaeb41
commit d6f5b3120c
14 changed files with 16 additions and 21 deletions

View File

@ -2,9 +2,9 @@ use std::{collections::HashMap, path};
use anyhow::Result; use anyhow::Result;
use crate::app::{ use crate::{
app::sessions,
reader::{self, Reader}, reader::{self, Reader},
sessions,
}; };
use super::Delta; use super::Delta;

View File

@ -13,10 +13,9 @@ use uuid::Uuid;
use crate::{fs, projects, users}; use crate::{fs, projects, users};
use crate::app::{ use crate::{
project_repository, app::{project_repository, sessions},
reader::{self, Reader}, reader::{self, Reader},
sessions,
}; };
pub struct Repository { pub struct Repository {

View File

@ -4,12 +4,10 @@ pub mod gb_repository;
pub mod project_repository; pub mod project_repository;
pub mod projects; pub mod projects;
pub mod pty; pub mod pty;
pub mod reader;
pub mod search; pub mod search;
pub mod sessions; pub mod sessions;
pub mod users; pub mod users;
pub mod watcher; pub mod watcher;
mod writer;
pub use app::{AddProjectError, App}; pub use app::{AddProjectError, App};
pub use project_repository::FileStatus; pub use project_repository::FileStatus;

View File

@ -4,10 +4,7 @@ use anyhow::{Context, Result};
use serde::Serialize; use serde::Serialize;
use walkdir::WalkDir; use walkdir::WalkDir;
use crate::{ use crate::{app::project_repository::activity, projects, reader};
app::{project_repository::activity, reader},
projects,
};
pub struct Repository<'repository> { pub struct Repository<'repository> {
pub(crate) git_repository: git2::Repository, pub(crate) git_repository: git2::Repository,

View File

@ -1,6 +1,6 @@
use anyhow::{Context, Result}; use anyhow::{Context, Result};
use crate::app::reader::{CommitReader, Reader}; use crate::reader::{CommitReader, Reader};
use super::{cache, Session, SessionError}; use super::{cache, Session, SessionError};

View File

@ -2,8 +2,8 @@ use std::collections::HashMap;
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use crate::app::{ use crate::{
gb_repository, app::gb_repository,
reader::{self, CommitReader, Reader}, reader::{self, CommitReader, Reader},
}; };

View File

@ -1,8 +1,9 @@
use crate::app::reader;
use anyhow::{Context, Result}; use anyhow::{Context, Result};
use serde::Serialize; use serde::Serialize;
use thiserror::Error; use thiserror::Error;
use crate::reader;
#[derive(Debug, Clone, Serialize, PartialEq)] #[derive(Debug, Clone, Serialize, PartialEq)]
#[serde(rename_all = "camelCase")] #[serde(rename_all = "camelCase")]
pub struct Meta { pub struct Meta {

View File

@ -2,8 +2,8 @@ use std::time;
use anyhow::{anyhow, Context, Result}; use anyhow::{anyhow, Context, Result};
use crate::app::{ use crate::{
deltas, gb_repository, pty, app::{deltas, gb_repository, pty},
reader::{self, Reader}, reader::{self, Reader},
writer::{self, Writer}, writer::{self, Writer},
}; };

View File

@ -3,11 +3,9 @@ use std::vec;
use anyhow::{Context, Result}; use anyhow::{Context, Result};
use crate::{ use crate::{
app::{ app::{deltas, gb_repository, project_repository},
deltas, gb_repository, project_repository,
reader::{self, Reader},
},
projects, projects,
reader::{self, Reader},
}; };
use super::events; use super::events;

View File

@ -4,6 +4,8 @@ extern crate scopeguard;
extern crate lazy_static; extern crate lazy_static;
mod app; mod app;
mod reader;
mod writer;
mod zip; mod zip;
mod events; mod events;
mod fs; mod fs;