mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-25 07:45:41 +03:00
Merge pull request #1931 from gitbutlerapp/rename-mod-modules-to-named-modules
rename `.mod` modules to named modules
This commit is contained in:
commit
615c333ade
@ -66,6 +66,8 @@ unneeded_field_pattern = "deny"
|
||||
unseparated_literal_suffix = "deny"
|
||||
if_then_some_else_none = "deny"
|
||||
use_debug = "deny"
|
||||
mod_module_files = "deny"
|
||||
self_named_module_files = "allow"
|
||||
# TODO
|
||||
# partial_pub_fields = "deny"
|
||||
# print_stdout = "deny"
|
||||
|
35
packages/butler/src/commands.rs
Normal file
35
packages/butler/src/commands.rs
Normal file
@ -0,0 +1,35 @@
|
||||
mod branches;
|
||||
pub use branches::Branches;
|
||||
|
||||
mod clear;
|
||||
pub use clear::Clear;
|
||||
|
||||
mod commit;
|
||||
pub use commit::Commit;
|
||||
|
||||
mod flush;
|
||||
pub use flush::Flush;
|
||||
|
||||
mod info;
|
||||
pub use info::Info;
|
||||
|
||||
mod mv;
|
||||
pub use mv::Move;
|
||||
|
||||
mod new;
|
||||
pub use new::New;
|
||||
|
||||
mod remotes;
|
||||
pub use remotes::Remotes;
|
||||
|
||||
mod reset;
|
||||
pub use reset::Reset;
|
||||
|
||||
mod run;
|
||||
pub use run::RunCommand;
|
||||
|
||||
mod setup;
|
||||
pub use setup::Setup;
|
||||
|
||||
mod status;
|
||||
pub use status::Status;
|
@ -1,6 +1,6 @@
|
||||
use std::path;
|
||||
|
||||
#![allow(unused)]
|
||||
use gblib::git;
|
||||
use std::path;
|
||||
|
||||
pub fn temp_dir() -> std::path::PathBuf {
|
||||
tempfile::tempdir()
|
||||
@ -250,3 +250,12 @@ impl TestProject {
|
||||
submodule.add_finalize().unwrap();
|
||||
}
|
||||
}
|
||||
|
||||
pub mod paths {
|
||||
use super::temp_dir;
|
||||
use gblib::paths::DataDir;
|
||||
|
||||
pub fn data_dir() -> DataDir {
|
||||
DataDir::from(temp_dir())
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
use std::path;
|
||||
mod common;
|
||||
|
||||
use self::common::{paths, TestProject};
|
||||
use gblib::{gb_repository, git, project_repository, projects};
|
||||
|
||||
use crate::{common::TestProject, paths};
|
||||
use std::path;
|
||||
|
||||
mod init {
|
||||
use super::*;
|
@ -1,7 +0,0 @@
|
||||
#![allow(clippy::dbg_macro)]
|
||||
|
||||
mod common;
|
||||
mod gb_repository;
|
||||
mod paths;
|
||||
mod projects;
|
||||
mod virtual_branches;
|
@ -1,7 +0,0 @@
|
||||
use gblib::paths::DataDir;
|
||||
|
||||
use crate::common::temp_dir;
|
||||
|
||||
pub fn data_dir() -> DataDir {
|
||||
DataDir::from(temp_dir())
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
use gblib::projects::Controller;
|
||||
mod common;
|
||||
|
||||
use crate::{common, paths};
|
||||
use self::common::paths;
|
||||
use gblib::projects::Controller;
|
||||
|
||||
pub fn new() -> Controller {
|
||||
let data_dir = paths::data_dir();
|
@ -1,9 +1,13 @@
|
||||
//TODO:
|
||||
#![allow(
|
||||
clippy::redundant_closure_for_method_calls,
|
||||
clippy::rest_pat_in_fully_bound_structs
|
||||
clippy::rest_pat_in_fully_bound_structs,
|
||||
clippy::dbg_macro
|
||||
)]
|
||||
|
||||
mod common;
|
||||
|
||||
use self::common::{paths, TestProject};
|
||||
use std::{fs, path, str::FromStr};
|
||||
|
||||
use gblib::{
|
||||
@ -14,8 +18,6 @@ use gblib::{
|
||||
virtual_branches::{branch, controller::ControllerError, errors, Controller},
|
||||
};
|
||||
|
||||
use crate::{common::TestProject, paths};
|
||||
|
||||
struct Test {
|
||||
repository: TestProject,
|
||||
project_id: ProjectId,
|
Loading…
Reference in New Issue
Block a user