mirror of
https://github.com/NixOS/nix.git
synced 2025-11-15 23:12:44 +01:00
Merge pull request #14502 from obsidiansystems/more-store-object-info-json-cleanup
More store object info json cleanup
This commit is contained in:
commit
68a5110fb9
18 changed files with 111 additions and 78 deletions
|
|
@ -114,4 +114,13 @@ struct adl_serializer<std::optional<T>>
|
|||
}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
static inline std::optional<T> ptrToOwned(const json * ptr)
|
||||
{
|
||||
if (ptr)
|
||||
return std::optional{*ptr};
|
||||
else
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
} // namespace nlohmann
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue