summaryrefslogtreecommitdiff
path: root/dhall_syntax/src/printer.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--dhall_syntax/src/printer.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/dhall_syntax/src/printer.rs b/dhall_syntax/src/printer.rs
index dbed55d..8503a1e 100644
--- a/dhall_syntax/src/printer.rs
+++ b/dhall_syntax/src/printer.rs
@@ -380,17 +380,19 @@ impl Display for ImportHashed {
Absolute => "",
};
write!(f, "{}/", prefix)?;
- let path: String = path
- .iter()
+ let full_path: String = path
+ .clone()
+ .into_iter()
.map(|c| fmt_local_path_component(c.as_ref()))
.join("/");
- f.write_str(&path)?;
+ f.write_str(&full_path)?;
}
Remote(url) => {
write!(f, "{}://{}/", url.scheme, url.authority,)?;
let path: String = url
.path
- .iter()
+ .clone()
+ .into_iter()
.map(|c| fmt_remote_path_component(c.as_ref()))
.join("/");
f.write_str(&path)?;