summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/config/tree/keys.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/gix/src/config/tree/keys.rs')
-rw-r--r--vendor/gix/src/config/tree/keys.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/gix/src/config/tree/keys.rs b/vendor/gix/src/config/tree/keys.rs
index 1cdd187d0..b03fa49c6 100644
--- a/vendor/gix/src/config/tree/keys.rs
+++ b/vendor/gix/src/config/tree/keys.rs
@@ -179,10 +179,10 @@ pub type Url = Any<validate::Url>;
/// A key that represents a UTF-8 string.
pub type String = Any<validate::String>;
-/// A key that represents a RefSpec for pushing.
+/// A key that represents a `RefSpec` for pushing.
pub type PushRefSpec = Any<validate::PushRefSpec>;
-/// A key that represents a RefSpec for fetching.
+/// A key that represents a `RefSpec` for fetching.
pub type FetchRefSpec = Any<validate::FetchRefSpec>;
mod duration {
@@ -511,7 +511,8 @@ pub mod validate {
gix_config::Integer::try_from(value)?
.to_decimal()
.ok_or_else(|| format!("integer {value} cannot be represented as `usize`"))?,
- )?;
+ )
+ .map_err(|_| "cannot use sign for unsigned integer")?;
Ok(())
}
}