diff options
author | Shea Levy <shea@shealevy.com> | 2018-05-22 16:42:02 -0400 |
---|---|---|
committer | Shea Levy <shea@shealevy.com> | 2018-05-22 16:42:02 -0400 |
commit | 6da6accd303be776bb4e958da52046da86f9cb5c (patch) | |
tree | d6cd95529b829d4fa8d592c8cd5209b34f68d90a /lib/tests | |
parent | 74083c8cd71071739712213410a6733c98f0af33 (diff) | |
download | nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.tar nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.tar.gz nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.tar.bz2 nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.tar.lz nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.tar.xz nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.tar.zst nixlib-6da6accd303be776bb4e958da52046da86f9cb5c.zip |
treewide: Remove uses of builtins.toPath.
toPath has confusing semantics and is never necessary; it can always either just be omitted or replaced by pre-concatenating `/.`. It has been marked as "!!! obsolete?" for more than 10 years in a C++ comment, hopefully removing it will let us properly deprecate and, eventually, remove it.
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/misc.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/tests/misc.nix b/lib/tests/misc.nix index c683df7d7ca3..c0e1aaa248eb 100644 --- a/lib/tests/misc.nix +++ b/lib/tests/misc.nix @@ -97,7 +97,7 @@ runTests { storePathAppendix = isStorePath "${goodPath}/bin/python"; nonAbsolute = isStorePath (concatStrings (tail (stringToCharacters goodPath))); - asPath = isStorePath (builtins.toPath goodPath); + asPath = isStorePath goodPath; otherPath = isStorePath "/something/else"; otherVals = { attrset = isStorePath {}; @@ -318,7 +318,7 @@ runTests { int = 42; bool = true; string = ''fno"rd''; - path = /. + "/foo"; # toPath returns a string + path = /. + "/foo"; null_ = null; function = x: x; functionArgs = { arg ? 4, foo }: arg; |