Skip to content

Commit 6b1da80

Browse files
committed
Simplify.
1 parent e0ce092 commit 6b1da80

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

src/comp/metadata/creader.rs

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -170,17 +170,9 @@ fn visit_view_item(env e, &@ast::view_item i) {
170170
fn visit_item(env e, &@ast::item i) {
171171
alt (i.node) {
172172
case (ast::item_native_mod(?m)) {
173-
alt (m.abi) {
174-
case (ast::native_abi_rust) {
175-
e.sess.add_used_library(m.native_name);
176-
}
177-
case (ast::native_abi_cdecl) {
178-
e.sess.add_used_library(m.native_name);
179-
}
180-
case (ast::native_abi_llvm) {
181-
}
182-
case (ast::native_abi_rust_intrinsic) {
183-
}
173+
if (m.abi == ast::native_abi_rust ||
174+
m.abi == ast::native_abi_cdecl) {
175+
e.sess.add_used_library(m.native_name);
184176
}
185177
}
186178
case (_) {

0 commit comments

Comments
 (0)