Skip to content

Commit 1072ce0

Browse files
committed
Use Int64 consistently for all progress event values
1 parent 4b1140b commit 1072ce0

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Sources/ContainerizationEXT4/Formatter+Unpack.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ extension EXT4.Formatter {
6565
if path.base == ".wh..wh..opq" { // whiteout directory
6666
try self.unlink(path: path.dir, directoryWhiteout: true)
6767
if let progress {
68-
await progress([ProgressEvent(event: "add-items", value: 1)])
68+
await progress([ProgressEvent(event: "add-items", value: Int64(1))])
6969
}
7070
continue
7171
}
@@ -74,7 +74,7 @@ extension EXT4.Formatter {
7474
let dir: FilePath = path.dir
7575
try self.unlink(path: dir.join(filePath))
7676
if let progress {
77-
await progress([ProgressEvent(event: "add-items", value: 1)])
77+
await progress([ProgressEvent(event: "add-items", value: Int64(1))])
7878
}
7979
continue
8080
}
@@ -83,7 +83,7 @@ extension EXT4.Formatter {
8383
let hl = preProcessPath(s: hardlink)
8484
hardlinks[path] = FilePath(hl)
8585
if let progress {
86-
await progress([ProgressEvent(event: "add-items", value: 1)])
86+
await progress([ProgressEvent(event: "add-items", value: Int64(1))])
8787
}
8888
continue
8989
}
@@ -118,7 +118,7 @@ extension EXT4.Formatter {
118118
}
119119

120120
if let progress {
121-
await progress([ProgressEvent(event: "add-items", value: 1)])
121+
await progress([ProgressEvent(event: "add-items", value: Int64(1))])
122122
}
123123
}
124124
guard hardlinks.acyclic else {

Tests/ContainerizationEXT4Tests/TestFormatterUnpack.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ struct UnpackProgressTest {
227227
let value = try #require(event.value as? Int64, "add-size value should be Int64")
228228
cumulativeSize += value
229229
case "add-items":
230-
let value = try #require(event.value as? Int, "add-items value should be Int")
231-
itemCount += Int64(value)
230+
let value = try #require(event.value as? Int64, "add-items value should be Int64")
231+
itemCount += value
232232
default:
233233
break
234234
}

0 commit comments

Comments
 (0)