aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/serve-protocol-impl.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/serve-protocol-impl.hh')
-rw-r--r--src/libstore/serve-protocol-impl.hh9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/libstore/serve-protocol-impl.hh b/src/libstore/serve-protocol-impl.hh
index a3ce81026..845889451 100644
--- a/src/libstore/serve-protocol-impl.hh
+++ b/src/libstore/serve-protocol-impl.hh
@@ -20,9 +20,9 @@ namespace nix {
{ \
return LengthPrefixedProtoHelper<ServeProto, T >::read(store, conn); \
} \
- TEMPLATE void ServeProto::Serialise< T >::write(const Store & store, ServeProto::WriteConn conn, const T & t) \
+ TEMPLATE [[nodiscard]] WireFormatGenerator ServeProto::Serialise< T >::write(const Store & store, ServeProto::WriteConn conn, const T & t) \
{ \
- LengthPrefixedProtoHelper<ServeProto, T >::write(store, conn, t); \
+ return LengthPrefixedProtoHelper<ServeProto, T >::write(store, conn, t); \
}
SERVE_USE_LENGTH_PREFIX_SERIALISER(template<typename T>, std::vector<T>)
@@ -46,9 +46,10 @@ struct ServeProto::Serialise
return CommonProto::Serialise<T>::read(store,
CommonProto::ReadConn { .from = conn.from });
}
- static void write(const Store & store, ServeProto::WriteConn conn, const T & t)
+ [[nodiscard]]
+ static WireFormatGenerator write(const Store & store, ServeProto::WriteConn conn, const T & t)
{
- CommonProto::Serialise<T>::write(store,
+ return CommonProto::Serialise<T>::write(store,
CommonProto::WriteConn { .to = conn.to },
t);
}