rename mod.rs files to named modules

This commit is contained in:
Josh Junon 2023-12-05 15:58:43 +01:00 committed by GitButler
parent a4e3623530
commit e9869013d3
31 changed files with 24 additions and 24 deletions

View File

@ -67,6 +67,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"

View File

@ -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())
}
}

View File

@ -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::*;

View File

@ -1,7 +0,0 @@
#![allow(clippy::dbg_macro)]
mod common;
mod gb_repository;
mod paths;
mod projects;
mod virtual_branches;

View File

@ -1,7 +0,0 @@
use gblib::paths::DataDir;
use crate::common::temp_dir;
pub fn data_dir() -> DataDir {
DataDir::from(temp_dir())
}

View File

@ -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();

View File

@ -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,