Skip to content

Commit

Permalink
tests: rpc: adjust sstring serializer for current serializer protocol
Browse files Browse the repository at this point in the history
The sstring serializer was not in use, and so bit-rotted.
  • Loading branch information
avikivity committed Jan 14, 2016
1 parent 04d4887 commit b58f0e6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/rpc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,13 @@ inline double read(serializer, Input& input, rpc::type<double>) { return read_ar

template <typename Output>
inline void write(serializer, Output& out, const sstring& v) {
write(out, v.size());
write_arithmetic_type(out, uint32_t(v.size()));
out.write(v.c_str(), v.size());
}

template <typename Input>
inline sstring read(serializer, Input& in) {
auto size = read<size_t>(in);
inline sstring read(serializer, Input& in, rpc::type<sstring>) {
auto size = read_arithmetic_type<uint32_t>(in);
sstring ret(sstring::initialized_later(), size);
in.read(ret.begin(), size);
return ret;
Expand Down

0 comments on commit b58f0e6

Please sign in to comment.