use unreachable keyword for unreachable code path

This commit is contained in:
Igor Anić
2024-04-11 17:47:36 +02:00
committed by Andrew Kelley
parent 035c1b6522
commit e0350859bb

View File

@@ -1189,7 +1189,7 @@ fn unpackTarball(f: *Fetch, out_dir: fs.Dir, reader: anytype) RunError!UnpackRes
.unable_to_create_file => |i| res.unableToCreateFile(stripRoot(i.file_name, res.root_dir), i.code),
.unable_to_create_sym_link => |i| res.unableToCreateSymLink(stripRoot(i.file_name, res.root_dir), i.link_name, i.code),
.unsupported_file_type => |i| res.unsupportedFileType(stripRoot(i.file_name, res.root_dir), @intFromEnum(i.file_type)),
.components_outside_stripped_prefix => {}, // impossible with strip_components = 0
.components_outside_stripped_prefix => unreachable, // unreachable with strip_components = 0
}
}
}