Skip to content

Commit 8325003

Browse files
committed
use unreachable keyword for unreachable code path
1 parent 18dccf9 commit 8325003

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Package/Fetch.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1184,7 +1184,7 @@ fn unpackTarball(f: *Fetch, out_dir: fs.Dir, reader: anytype) RunError!UnpackRes
11841184
.unable_to_create_file => |i| res.unableToCreateFile(stripRoot(i.file_name, res.root_dir), i.code),
11851185
.unable_to_create_sym_link => |i| res.unableToCreateSymLink(stripRoot(i.file_name, res.root_dir), i.link_name, i.code),
11861186
.unsupported_file_type => |i| res.unsupportedFileType(stripRoot(i.file_name, res.root_dir), @intFromEnum(i.file_type)),
1187-
.components_outside_stripped_prefix => {}, // impossible with strip_components = 0
1187+
.components_outside_stripped_prefix => unreachable, // unreachable with strip_components = 0
11881188
}
11891189
}
11901190
}

0 commit comments

Comments
 (0)