summaryrefslogtreecommitdiffstats
path: root/vendor/gix-credentials/src/protocol/context
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 18:31:44 +0000
commitc23a457e72abe608715ac76f076f47dc42af07a5 (patch)
tree2772049aaf84b5c9d0ed12ec8d86812f7a7904b6 /vendor/gix-credentials/src/protocol/context
parentReleasing progress-linux version 1.73.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-c23a457e72abe608715ac76f076f47dc42af07a5.tar.xz
rustc-c23a457e72abe608715ac76f076f47dc42af07a5.zip
Merging upstream version 1.74.1+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/gix-credentials/src/protocol/context')
-rw-r--r--vendor/gix-credentials/src/protocol/context/serde.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/vendor/gix-credentials/src/protocol/context/serde.rs b/vendor/gix-credentials/src/protocol/context/serde.rs
index f713cbf4c..0f3b4b024 100644
--- a/vendor/gix-credentials/src/protocol/context/serde.rs
+++ b/vendor/gix-credentials/src/protocol/context/serde.rs
@@ -74,7 +74,10 @@ pub mod decode {
let mut ctx = Context::default();
for res in input.lines().take_while(|line| !line.is_empty()).map(|line| {
let mut it = line.splitn(2, |b| *b == b'=');
- match (it.next().and_then(|k| k.to_str().ok()), it.next().map(|v| v.as_bstr())) {
+ match (
+ it.next().and_then(|k| k.to_str().ok()),
+ it.next().map(ByteSlice::as_bstr),
+ ) {
(Some(key), Some(value)) => validate(key, value)
.map(|_| (key, value.to_owned()))
.map_err(Into::into),
@@ -99,9 +102,7 @@ pub mod decode {
"url" => ctx.url = Some(value),
"path" => ctx.path = Some(value),
"quit" => {
- ctx.quit = gix_config_value::Boolean::try_from(value.as_ref())
- .ok()
- .map(|b| b.into());
+ ctx.quit = gix_config_value::Boolean::try_from(value.as_ref()).ok().map(Into::into);
}
_ => {}
}