----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/19007/#review39958 -----------------------------------------------------------
Ship it! src/state/log.cpp <https://reviews.apache.org/r/19007/#comment72744> Alternatively, since you've already ensured the entry is present: const Snapshot& snapshot = snapshots[entry.name()]; But I suppose it would be good to be prudent and avoid the non-const map operation. We could also pull out the Option<Snapshot>: Option<Snapshot> snapshot = snapshots.get(entry.name()); if (snapshot.isNone()) { return false; } ... The .get(...).get() pattern seems a bit unfortunate in general. - Ben Mahler On March 31, 2014, 7:11 a.m., Benjamin Hindman wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/19007/ > ----------------------------------------------------------- > > (Updated March 31, 2014, 7:11 a.m.) > > > Review request for mesos, Ben Mahler and Jie Yu. > > > Repository: mesos-git > > > Description > ------- > > This is a combination of both https://reviews.apache.org/r/17423 and > https://reviews.apache.org/r/17424 which have been merged to make it easier > to make changes. > > > Diffs > ----- > > src/Makefile.am 47d03b393f68ebd4e9eba3206798a939078023c0 > src/messages/state.proto 7f7a8a505d6f24b01fec0c3ad47b0e15b2b17ffa > src/state/log.hpp PRE-CREATION > src/state/log.cpp PRE-CREATION > src/tests/state_tests.cpp d0e084070c566ee7d751a8e1279772e05b966145 > > Diff: https://reviews.apache.org/r/19007/diff/ > > > Testing > ------- > > make check > > > Thanks, > > Benjamin Hindman > >
