aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/common-protocol.hh
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstore/common-protocol.hh')
-rw-r--r--src/libstore/common-protocol.hh7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/libstore/common-protocol.hh b/src/libstore/common-protocol.hh
index f3f28972a..7f9f2808a 100644
--- a/src/libstore/common-protocol.hh
+++ b/src/libstore/common-protocol.hh
@@ -48,9 +48,10 @@ struct CommonProto
* infer the type instead of having to write it down explicitly.
*/
template<typename T>
- static void write(const Store & store, WriteConn conn, const T & t)
+ [[nodiscard]]
+ static WireFormatGenerator write(const Store & store, WriteConn conn, const T & t)
{
- CommonProto::Serialise<T>::write(store, conn, t);
+ return CommonProto::Serialise<T>::write(store, conn, t);
}
};
@@ -58,7 +59,7 @@ struct CommonProto
struct CommonProto::Serialise< T > \
{ \
static T read(const Store & store, CommonProto::ReadConn conn); \
- static void write(const Store & store, CommonProto::WriteConn conn, const T & str); \
+ [[nodiscard]] static WireFormatGenerator write(const Store & store, CommonProto::WriteConn conn, const T & str); \
}
template<>