lib: remove unused let bindings and args@{} uses

This commit is contained in:
Michael Daniels
2026-04-30 18:43:34 -04:00
parent 3e84d44fb6
commit 18e82c4591
10 changed files with 3 additions and 28 deletions

View File

@@ -123,7 +123,6 @@ let
pathExists pathExists
seq seq
typeOf typeOf
nixVersion
; ;
inherit (lib.lists) inherit (lib.lists)
@@ -138,7 +137,6 @@ let
inherit (lib.strings) inherit (lib.strings)
isStringLike isStringLike
versionOlder
; ;
inherit (lib.filesystem) inherit (lib.filesystem)

View File

@@ -371,7 +371,6 @@ in
let let
inherit (lib) inherit (lib)
concatMapAttrs concatMapAttrs
id
makeScope makeScope
recurseIntoAttrs recurseIntoAttrs
removeSuffix removeSuffix

View File

@@ -19,7 +19,6 @@ let
isString isString
match match
typeOf typeOf
elemAt
; ;
in in

View File

@@ -23,7 +23,6 @@ let
*/ */
ipv6Bits = 128; ipv6Bits = 128;
ipv6Pieces = 8; # 'x:x:x:x:x:x:x:x' ipv6Pieces = 8; # 'x:x:x:x:x:x:x:x'
ipv6PieceBits = 16; # One piece in range from 0 to 0xffff.
ipv6PieceMaxValue = 65535; # 2^16 - 1 ipv6PieceMaxValue = 65535; # 2^16 - 1
in in
let let

View File

@@ -468,7 +468,7 @@ rec {
: 3\. Function argument : 3\. Function argument
*/ */
mergeUniqueOption = mergeUniqueOption =
args@{ {
message, message,
# WARNING: the default merge function assumes that the definition is a valid (option) value. You MUST pass a merge function if the return value needs to be # WARNING: the default merge function assumes that the definition is a valid (option) value. You MUST pass a merge function if the return value needs to be
# - type checked beyond what .check does (which should be very little; only on the value head; not attribute values, etc) # - type checked beyond what .check does (which should be very little; only on the value head; not attribute values, etc)

View File

@@ -51,7 +51,6 @@ let
filter filter
filterAttrs filterAttrs
fix fix
fold
foldAttrs foldAttrs
foldl foldl
foldl' foldl'
@@ -4794,7 +4793,7 @@ runTests {
# for sub-directories # for sub-directories
testPackagesFromDirectoryNestedScopes = testPackagesFromDirectoryNestedScopes =
let let
inherit (lib) makeScope recurseIntoAttrs; inherit (lib) makeScope;
emptyScope = makeScope lib.callPackageWith (_: { }); emptyScope = makeScope lib.callPackageWith (_: { });
in in
{ {

View File

@@ -3,16 +3,10 @@ let
inherit (lib) inherit (lib)
types types
mkOption mkOption
setDefaultModuleLocation
evalModules evalModules
; ;
inherit (types) inherit (types)
deferredModule deferredModule
lazyAttrsOf
submodule
str
raw
enum
; ;
in in
{ {

View File

@@ -1,12 +1,11 @@
{ lib, ... }: { lib, ... }:
let let
inherit (lib) types mkOption setDefaultModuleLocation; inherit (lib) types mkOption;
inherit (types) inherit (types)
deferredModule deferredModule
lazyAttrsOf lazyAttrsOf
submodule submodule
str str
raw
enum enum
; ;
in in

View File

@@ -1,15 +1,4 @@
{ lib, ... }: { lib, ... }:
let
inherit (lib) mkOption types;
moduleWithKey =
{ config, ... }:
{
config = {
enable = true;
};
};
in
{ {
imports = [ imports = [
./declare-enable.nix ./declare-enable.nix

View File

@@ -6,7 +6,6 @@
}: }:
let let
inherit (lib) mkOption types; inherit (lib) mkOption types;
forceDeep = x: builtins.deepSeq x x;
mergedSubOption = (options.merged.type.getSubOptions options.merged.loc).extensible; mergedSubOption = (options.merged.type.getSubOptions options.merged.loc).extensible;
in in
{ {