Skip to content

Commit d28d9e3

Browse files
committed
Rename loadFromDisk
1 parent 3eb0da6 commit d28d9e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Sources/Basics/AuthorizationProvider.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public struct NetrcAuthorizationProvider: AuthorizationProvider {
6767
public init(path: AbsolutePath, fileSystem: FileSystem) throws {
6868
self.path = path
6969
self.fileSystem = fileSystem
70-
self.underlying = try Self.loadFromDisk(path: path)
70+
self.underlying = try Self.load(from: path)
7171
}
7272

7373
public mutating func addOrUpdate(for url: Foundation.URL, user: String, password: String, callback: @escaping (Result<Void, Error>) -> Void) {
@@ -97,7 +97,7 @@ public struct NetrcAuthorizationProvider: AuthorizationProvider {
9797
do {
9898
try self.saveToDisk(machines: machines)
9999
// At this point the netrc file should exist and non-empty
100-
guard let netrc = try Self.loadFromDisk(path: self.path) else {
100+
guard let netrc = try Self.load(from: self.path) else {
101101
throw AuthorizationProviderError.other("Failed to update netrc file at \(self.path)")
102102
}
103103
self.underlying = netrc
@@ -135,7 +135,7 @@ public struct NetrcAuthorizationProvider: AuthorizationProvider {
135135
}
136136
}
137137

138-
private static func loadFromDisk(path: AbsolutePath) throws -> TSCUtility.Netrc? {
138+
private static func load(from path: AbsolutePath) throws -> TSCUtility.Netrc? {
139139
do {
140140
return try TSCUtility.Netrc.load(fromFileAtPath: path).get()
141141
} catch {

0 commit comments

Comments
 (0)