-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
This (shortened) code does what's expected:
regex_switch!(s,
r"^export:(?<name>.+)$" => Self::Export(name.to_string()),
r"^(?:internal:)?toggle-backtrace\(2\)$" => Self::ToggleBacktrace("2"),
r"^(?:internal:)?toggle-backtrace\(full\)$" => Self::ToggleBacktrace("full"),
r"^(?:internal:)?toggle-backtrace\((?<level>)\)$" => {
return Err(ParseActionError::InvalidBacktraceLevel(level.to_string()));
}
r"^(?:internal:)?toggle-summary$" => Self::ToggleSummary,
r"^focus[_-]file\((?<file>.*)\)$" => Self::FocusFile(FocusFileCommand::new(file)),
).ok_or(ParseActionError::UnknownAction(s.to_string()))But it triggers an "unreachable_code" warning:
I'm not sure yet of the best way to prevent this false positive.
Metadata
Metadata
Assignees
Labels
No labels
