diff options
author | j-james | 2020-11-06 20:11:37 +0000 |
---|---|---|
committer | j-james | 2020-11-06 20:11:37 +0000 |
commit | 3eb14df9811583e4c4034f76604895cf79f311f1 (patch) | |
tree | d2dfc09d82bd5d9bdb2145a497c1db38ec9750e6 /src/common.nim | |
parent | 7242638eb774b39b3c0fe0f4d2c24e9138edfd24 (diff) |
Fix warnings introduced in Nim 1.4
Diffstat (limited to 'src/common.nim')
-rw-r--r-- | src/common.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common.nim b/src/common.nim index 3f9013c..618ea42 100644 --- a/src/common.nim +++ b/src/common.nim @@ -233,10 +233,10 @@ proc queryUnrequired*(handle: ptr AlpmHandle, withOptional: bool, withoutOptiona installed.add(pkg.toPackageReference) if pkg.reason == AlpmReason.explicit: explicit &= $pkg.name - dependsTable.add($pkg.name, - depends.map(x => (x, false)) + optional.map(x => (x, true))) + dependsTable[$pkg.name] = + depends.map(x => (x, false)) + optional.map(x => (x, true)) if provides.len > 0: - alternatives.add($pkg.name, provides) + alternatives[$pkg.name] = provides (installed, explicit.toHashSet + assumeExplicit, dependsTable, alternatives) @@ -484,7 +484,7 @@ proc cloneBareRepo(config: Config, bareKind: BareKind, bareName: string, if forkWait(() => (block: if not dropPrivileges or dropPrivileges(): - if existsDir(repoPath): + if dirExists(repoPath): let branch = branchOption.get("master") execResult(gitCmd, "-C", repoPath, "fetch", "-q", "--no-tags", "origin", branch & ":" & branch) @@ -665,7 +665,7 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string, if message.isSome: (1, message) - elif repoPath.existsDir(): + elif repoPath.dirExists(): (0, none(string)) else: let fullName = bareFullName(BareKind.pkg, base) @@ -674,7 +674,7 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string, let cloneBareCode = forkWait(() => (block: if not dropPrivileges or dropPrivileges(): - if existsDir(bareRepoPath): + if dirExists(bareRepoPath): execResult(gitCmd, "-C", bareRepoPath, "fetch", "-q", "--no-tags", "origin", "master:master") else: |