Skip to content

Commit 7834795

Browse files
committed
Ignore things we can't handle.
1 parent 42148ce commit 7834795

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/main.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,14 @@ fn process(oracle_cmd: &str, p: &Path) -> u64 {
3636
match &cur_txt[start..end] {
3737
"crate" => PubKind::Crate,
3838
"super" => PubKind::Super,
39-
_ => todo!(),
39+
_ => {
40+
// FIXME: this captures things we don't need to deal with (e.g. `pub(self)`),
41+
// things we could deal with (e.g. `pub(in ...)`) and random strings we've
42+
// accidentally picked up (e.g. `a pub(The Frog and Cow)`). We should probably
43+
// do something better with the middle class of thing than simply ignoring it.
44+
i = m.end();
45+
continue;
46+
}
4047
}
4148
} else {
4249
PubKind::Pub

0 commit comments

Comments
 (0)