diff --git a/Cargo.lock b/Cargo.lock index ed1cc551b..fe22125aa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2342,6 +2342,7 @@ version = "0.0.0" dependencies = [ "git2", "gitbutler-core", + "gitbutler-tagged-string", "regex", "serde", "thiserror", @@ -2425,6 +2426,13 @@ dependencies = [ "tracing", ] +[[package]] +name = "gitbutler-tagged-string" +version = "0.0.0" +dependencies = [ + "serde", +] + [[package]] name = "gitbutler-tauri" version = "0.0.0" diff --git a/Cargo.toml b/Cargo.toml index ce29445fd..2e274eca3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,8 @@ members = [ "crates/gitbutler-storage", "crates/gitbutler-fs", "crates/gitbutler-time", - "crates/gitbutler-commit", + "crates/gitbutler-commit", + "crates/gitbutler-tagged-string", ] resolver = "2" @@ -65,6 +66,7 @@ gitbutler-storage = { path = "crates/gitbutler-storage" } gitbutler-fs = { path = "crates/gitbutler-fs" } gitbutler-time = { path = "crates/gitbutler-time" } gitbutler-commit = { path = "crates/gitbutler-commit" } +gitbutler-tagged-string = { path = "crates/gitbutler-tagged-string" } [profile.release] codegen-units = 1 # Compile crates one after another so the compiler can optimize better diff --git a/crates/gitbutler-core/src/lib.rs b/crates/gitbutler-core/src/lib.rs index f098298ab..1d8b87b9b 100644 --- a/crates/gitbutler-core/src/lib.rs +++ b/crates/gitbutler-core/src/lib.rs @@ -14,6 +14,5 @@ )] pub mod git; -pub mod types; #[cfg(target_os = "windows")] pub mod windows; diff --git a/crates/gitbutler-core/src/types/mod.rs b/crates/gitbutler-core/src/types/mod.rs deleted file mode 100644 index 4660319b8..000000000 --- a/crates/gitbutler-core/src/types/mod.rs +++ /dev/null @@ -1,2 +0,0 @@ -mod tagged_string; -pub use tagged_string::*; diff --git a/crates/gitbutler-reference/Cargo.toml b/crates/gitbutler-reference/Cargo.toml index 075b74b13..d2debe696 100644 --- a/crates/gitbutler-reference/Cargo.toml +++ b/crates/gitbutler-reference/Cargo.toml @@ -9,5 +9,6 @@ publish = false regex = "1.10" git2.workspace = true gitbutler-core.workspace = true +gitbutler-tagged-string.workspace = true serde = { workspace = true, features = ["std"]} thiserror.workspace = true diff --git a/crates/gitbutler-reference/src/lib.rs b/crates/gitbutler-reference/src/lib.rs index 8e161cd30..7f925d17a 100644 --- a/crates/gitbutler-reference/src/lib.rs +++ b/crates/gitbutler-reference/src/lib.rs @@ -1,5 +1,5 @@ mod refname; -use gitbutler_core::types::TaggedString; +use gitbutler_tagged_string::TaggedString; pub use refname::{LocalRefname, Refname, RemoteRefname, VirtualRefname}; use regex::Regex; diff --git a/crates/gitbutler-tagged-string/Cargo.toml b/crates/gitbutler-tagged-string/Cargo.toml new file mode 100644 index 000000000..63dfd3854 --- /dev/null +++ b/crates/gitbutler-tagged-string/Cargo.toml @@ -0,0 +1,9 @@ +[package] +name = "gitbutler-tagged-string" +version = "0.0.0" +edition = "2021" +authors = ["GitButler "] +publish = false + +[dependencies] +serde.workspace = true diff --git a/crates/gitbutler-core/src/types/tagged_string.rs b/crates/gitbutler-tagged-string/src/lib.rs similarity index 100% rename from crates/gitbutler-core/src/types/tagged_string.rs rename to crates/gitbutler-tagged-string/src/lib.rs