Create libs for common code

This commit is contained in:
Noah Knegt
2025-05-08 14:09:29 +02:00
parent 5d372f87cb
commit a2f2e303a0
13 changed files with 126 additions and 102 deletions

11
git/Cargo.toml Normal file
View File

@@ -0,0 +1,11 @@
[package]
name = "git"
version = "0.1.0"
edition.workspace = true
authors.workspace = true
license-file.workspace = true
repository.workspace = true
[dependencies]
thiserror = "2.0"

12
git/src/error.rs Normal file
View File

@@ -0,0 +1,12 @@
/// Git operations error type
#[derive(Debug, thiserror::Error)]
pub enum GitError {
#[error("Command failed with exit code: {0}")]
Failed(i32),
#[error("Command failed without exit code")]
FailedNoCode,
#[error("Failed to execute command: {0}")]
ExecutionError(#[from] std::io::Error),
}

1
git/src/lib.rs Normal file
View File

@@ -0,0 +1 @@
pub mod error;