style(format): reformat code with consistent line breaks and spacing

This commit is contained in:
zhenyi
2026-06-12 15:11:32 +08:00
parent 6f40921576
commit 0e13f90834
16 changed files with 381 additions and 347 deletions
+5 -4
View File
@@ -34,8 +34,7 @@ pub fn validate_oid_hex(hex: &str) -> GitResult<()> {
if hex.is_empty() {
return Err(GitError::InvalidArgument("oid hex cannot be empty".into()));
}
if !(crate::config::MIN_OID_HEX_LENGTH..=crate::config::MAX_OID_HEX_LENGTH)
.contains(&hex.len())
if !(crate::config::MIN_OID_HEX_LENGTH..=crate::config::MAX_OID_HEX_LENGTH).contains(&hex.len())
{
return Err(GitError::InvalidArgument(format!(
"oid hex length must be {}..={} chars: {}",
@@ -127,7 +126,8 @@ pub fn validate_revision(rev: &str) -> GitResult<()> {
if depth > crate::config::MAX_ANCESTRY_DEPTH {
return Err(GitError::InvalidArgument(format!(
"~N depth too large: {} (max {})",
depth, crate::config::MAX_ANCESTRY_DEPTH
depth,
crate::config::MAX_ANCESTRY_DEPTH
)));
}
}
@@ -151,7 +151,8 @@ pub fn validate_revision(rev: &str) -> GitResult<()> {
if depth > crate::config::MAX_ANCESTRY_DEPTH {
return Err(GitError::InvalidArgument(format!(
"^N depth too large: {} (max {})",
depth, crate::config::MAX_ANCESTRY_DEPTH
depth,
crate::config::MAX_ANCESTRY_DEPTH
)));
}
}