avoid modifying variable we are alting over

This commit is contained in:
Niko Matsakis 2012-05-29 16:33:48 -07:00
parent 1f4b3cfc36
commit 862976c267

View File

@ -106,7 +106,7 @@ fn sectionalize(desc: option<str>) -> (option<str>, [doc::section]) {
});
}
none {
alt current_section {
alt copy current_section {
some(section) {
current_section = some({
body: section.body + "\n" + line
@ -114,14 +114,14 @@ fn sectionalize(desc: option<str>) -> (option<str>, [doc::section]) {
});
}
none {
alt new_desc {
new_desc = alt new_desc {
some(desc) {
new_desc = some(desc + "\n" + line);
some(desc + "\n" + line)
}
none {
new_desc = some(line);
some(line)
}
}
};
}
}
}