srwalter / dbus-bytestream

Native D-Bus implementation for Rust
GNU Lesser General Public License v2.1
6 stars 4 forks source link

message: hide mutability #7

Closed mathstuf closed 8 years ago

mathstuf commented 8 years ago

Parsing of the body should not require a mutable message. Caching the result would probably be best.

mathstuf commented 8 years ago

Also conflicts with #6.

mathstuf commented 8 years ago

Updated to cache the body results. Also made get_header not require &mut (there is now get_header_mut instead).

srwalter commented 8 years ago

Looks like this needs a rebase, now. I'll merge it once the conflicts are fixed.

Thanks!

mathstuf commented 8 years ago

I rebased it. I also noticed that get_header could be better written, so that's done too. get_header_mut has issues with two mut references to self with that pattern, so I left it alone.