mirror of
https://github.com/NixOS/nix.git
synced 2025-11-16 07:22:43 +01:00
UnkeyedValidPathInfo::fromJSON Remove support for older version
It turns out this code path is only used for unit tests (to ensure our JSON formats are possible to parse by other code, elsewhere). No user-facing functionality consumes this format. Therefore, let's drop the old version parsing support.
This commit is contained in:
parent
5b15544bdd
commit
9c04c629e5
4 changed files with 20 additions and 30 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