summaryrefslogtreecommitdiffstats
path: root/vendor/gix/src/config/tree/keys.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:57:31 +0000
commitdc0db358abe19481e475e10c32149b53370f1a1c (patch)
treeab8ce99c4b255ce46f99ef402c27916055b899ee /vendor/gix/src/config/tree/keys.rs
parentReleasing progress-linux version 1.71.1+dfsg1-2~progress7.99u1. (diff)
downloadrustc-dc0db358abe19481e475e10c32149b53370f1a1c.tar.xz
rustc-dc0db358abe19481e475e10c32149b53370f1a1c.zip
Merging upstream version 1.72.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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(())
}
}