cleanup: Unbox View and Row

They are no longer referenced anywhere in C, so it's safe to let Rust memory management deal with them.
This commit is contained in:
Dorota Czaplejewicz
2019-12-07 15:50:21 +00:00
parent 1c4d027af5
commit 36362291ef
2 changed files with 19 additions and 16 deletions

View File

@ -405,7 +405,7 @@ impl Layout {
let views = HashMap::from_iter(
self.views.iter().map(|(name, view)| {(
name.clone(),
Box::new(::layout::View {
::layout::View {
bounds: ::layout::c::Bounds {
x: self.bounds.x,
y: self.bounds.y,
@ -413,7 +413,7 @@ impl Layout {
height: self.bounds.height,
},
rows: view.iter().map(|row| {
Box::new(::layout::Row {
::layout::Row {
angle: 0,
bounds: None,
buttons: row.split_ascii_whitespace().map(|name| {
@ -427,9 +427,9 @@ impl Layout {
&mut warning_handler,
))
}).collect(),
})
}
}).collect(),
})
}
)})
);