diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-07-16 06:42:37 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-07-16 06:42:37 -0600 |
commit | 2ef1fd342e3636c03cff26a2cec146b155a2d623 (patch) | |
tree | 9f6a9c7d6fff59366b3e47a24ef8a7474d257c14 | |
parent | 7e91577d0ad6ba539ef70ff74cde100c16655d35 (diff) | |
parent | ba71eb21b083c9fe4c360a1996e9809faab92741 (diff) | |
download | servo-2ef1fd342e3636c03cff26a2cec146b155a2d623.tar.gz servo-2ef1fd342e3636c03cff26a2cec146b155a2d623.zip |
Auto merge of #6632 - Ms2ger:unused-mut, r=jdm
Initialize info directly in get_system_heap_allocated.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6632)
<!-- Reviewable:end -->
-rw-r--r-- | components/profile/mem.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/components/profile/mem.rs b/components/profile/mem.rs index e3330531db0..00a5c51f14b 100644 --- a/components/profile/mem.rs +++ b/components/profile/mem.rs @@ -375,10 +375,9 @@ mod system_reporter { #[cfg(target_os="linux")] fn get_system_heap_allocated() -> Option<usize> { - let mut info: struct_mallinfo; - unsafe { - info = mallinfo(); - } + let info: struct_mallinfo = unsafe { + mallinfo() + }; // The documentation in the glibc man page makes it sound like |uordblks| // would suffice, but that only gets the small allocations that are put in // the brk heap. We need |hblkhd| as well to get the larger allocations |