Skip to content
Snippets Groups Projects
Commit 40b433d4 authored by Ian Jackson's avatar Ian Jackson
Browse files

tor-config: load: Avoid destructuring assignment

Not available in our MSRV.
parent b552c4e2
No related branches found
No related tags found
No related merge requests found
......@@ -316,8 +316,7 @@ fn copy_path(mut path: &serde_ignored::Path) -> UnrecognizedKey {
let mut descend = vec![];
loop {
let ent;
(path, ent) = match path {
let (new_path, ent) = match path {
SiP::Root => break,
SiP::Seq { parent, index } => (parent, Some(PE::ArrayIndex(*index))),
SiP::Map { parent, key } => (parent, Some(PE::MapEntry(key.clone()))),
......@@ -326,6 +325,7 @@ fn copy_path(mut path: &serde_ignored::Path) -> UnrecognizedKey {
| SiP::NewtypeVariant { parent } => (parent, None),
};
descend.extend(ent);
path = new_path;
}
descend.reverse();
UnrecognizedKey { path: descend }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment