Skip to content

Commit abcd8e0

Browse files
committed
Match on symbol if possible
1 parent 9d3e0c7 commit abcd8e0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎src/preempt_count/annotation.rs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ use crate::ctxt::AnalysisCtxt;
1212

1313
impl<'tcx> AnalysisCtxt<'tcx> {
1414
fn preemption_count_annotation_fallback(&self, def_id: DefId) -> PreemptionCount {
15-
match self.crate_name(def_id.krate).as_str() {
15+
match self.crate_name(def_id.krate) {
1616
// Happens in a test environment where build-std is not enabled.
17-
"core" | "alloc" | "std" => (),
17+
sym::core | sym::alloc | sym::std => (),
1818
_ => {
1919
warn!(
2020
"Unable to retrieve preemption count annotation of non-local function {:?}",

0 commit comments

Comments
 (0)