Skip to content

Commit

Permalink
One-liner!
Browse files Browse the repository at this point in the history
  • Loading branch information
mkeeter committed Jul 29, 2024
1 parent f8d9e04 commit 882e344
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/flamegraph/color/palettes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,7 @@ pub(super) mod rust {
use crate::flamegraph::color::BasicPalette;

pub(in super::super) fn resolve(name: &str) -> BasicPalette {
let name = if let Some(i) = name.find('`') {
&name[i + 1..]
} else {
name
};
let name = name.split_once('`').map(|(_, after)| after).unwrap_or(name);
if name.starts_with("core::")
|| name.starts_with("std::")
|| name.starts_with("alloc::")
Expand Down

0 comments on commit 882e344

Please sign in to comment.