|
|
@ -501,15 +501,13 @@ fn parse_mark_register_contents(
|
|
|
|
let mut rv_iter = rv.into_iter();
|
|
|
|
let mut rv_iter = rv.into_iter();
|
|
|
|
|
|
|
|
|
|
|
|
let Some(doc_id) = rv_iter
|
|
|
|
let Some(doc_id) = rv_iter
|
|
|
|
.next()
|
|
|
|
.next().map(|c| c.into_owned())
|
|
|
|
.and_then(|c| Some(c.into_owned()))
|
|
|
|
|
|
|
|
.and_then(|s| s.try_into().ok())
|
|
|
|
.and_then(|s| s.try_into().ok())
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return Err(anyhow!("Register did not contain valid document id"));
|
|
|
|
return Err(anyhow!("Register did not contain valid document id"));
|
|
|
|
};
|
|
|
|
};
|
|
|
|
let Some(history_rev) = rv_iter
|
|
|
|
let Some(history_rev) = rv_iter
|
|
|
|
.next()
|
|
|
|
.next().map(|c| c.into_owned())
|
|
|
|
.and_then(|c| Some(c.into_owned()))
|
|
|
|
|
|
|
|
.and_then(|s| s.parse().ok())
|
|
|
|
.and_then(|s| s.parse().ok())
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
return Err(anyhow!("Register did not contain valid revision number"));
|
|
|
|
return Err(anyhow!("Register did not contain valid revision number"));
|
|
|
|