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
seq
typeOf
nixVersion
;
inherit (lib.lists)
@@ -138,7 +137,6 @@ let
inherit (lib.strings)
isStringLike
versionOlder
;
inherit (lib.filesystem)

View File

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

View File

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

View File

@@ -23,7 +23,6 @@ let
*/
ipv6Bits = 128;
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
in
let

View File

@@ -468,7 +468,7 @@ rec {
: 3\. Function argument
*/
mergeUniqueOption =
args@{
{
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
# - 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
filterAttrs
fix
fold
foldAttrs
foldl
foldl'
@@ -4794,7 +4793,7 @@ runTests {
# for sub-directories
testPackagesFromDirectoryNestedScopes =
let
inherit (lib) makeScope recurseIntoAttrs;
inherit (lib) makeScope;
emptyScope = makeScope lib.callPackageWith (_: { });
in
{

View File

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

View File

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

View File

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

View File

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