From 3eb14df9811583e4c4034f76604895cf79f311f1 Mon Sep 17 00:00:00 2001 From: j-james Date: Fri, 6 Nov 2020 12:11:37 -0800 Subject: Fix warnings introduced in Nim 1.4 --- src/common.nim | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/common.nim') 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: -- cgit v1.2.3-70-g09d2