Create libs for common code
This commit is contained in:
11
git/Cargo.toml
Normal file
11
git/Cargo.toml
Normal 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
12
git/src/error.rs
Normal 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
1
git/src/lib.rs
Normal file
@@ -0,0 +1 @@
|
||||
pub mod error;
|
Reference in New Issue
Block a user