diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-08-01 13:42:02 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-08-08 14:53:17 -0700 |
commit | 370ac940dd7816ad4052fafa4e0f8d17784fa16b (patch) | |
tree | 8b44ebb7e8f4e218c1b4e57edfc6aaac212b90fa /src/libstore/worker-protocol.cc | |
parent | f3ef0899c744ff5256414c8539c75e798a058ee0 (diff) |
refactor: make HashType and Base enum classes for type safety
Change-Id: I9fbd55a9d50464a56fe11cb42a06a206914150d8
Diffstat (limited to 'src/libstore/worker-protocol.cc')
-rw-r--r-- | src/libstore/worker-protocol.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstore/worker-protocol.cc b/src/libstore/worker-protocol.cc index f85fba0ff..b9189df2b 100644 --- a/src/libstore/worker-protocol.cc +++ b/src/libstore/worker-protocol.cc @@ -158,7 +158,7 @@ WireFormatGenerator WorkerProto::Serialise<ValidPathInfo>::write(const Store & s UnkeyedValidPathInfo WorkerProto::Serialise<UnkeyedValidPathInfo>::read(const Store & store, ReadConn conn) { auto deriver = readString(conn.from); - auto narHash = Hash::parseAny(readString(conn.from), htSHA256); + auto narHash = Hash::parseAny(readString(conn.from), HashType::SHA256); UnkeyedValidPathInfo info(narHash); if (deriver != "") info.deriver = store.parseStorePath(deriver); info.references = WorkerProto::Serialise<StorePathSet>::read(store, conn); @@ -174,7 +174,7 @@ UnkeyedValidPathInfo WorkerProto::Serialise<UnkeyedValidPathInfo>::read(const St WireFormatGenerator WorkerProto::Serialise<UnkeyedValidPathInfo>::write(const Store & store, WriteConn conn, const UnkeyedValidPathInfo & pathInfo) { co_yield (pathInfo.deriver ? store.printStorePath(*pathInfo.deriver) : ""); - co_yield pathInfo.narHash.to_string(Base16, false); + co_yield pathInfo.narHash.to_string(Base::Base16, false); co_yield WorkerProto::write(store, conn, pathInfo.references); co_yield pathInfo.registrationTime; co_yield pathInfo.narSize; |