Skip to content

Commit

Permalink
Make Frame.is_xyz public, so we can build up custom filters easiler (
Browse files Browse the repository at this point in the history
  • Loading branch information
WindSoilder authored Oct 22, 2023
1 parent 1b32a77 commit 359c1ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ impl Frame {
///
/// If it fails to detect some patterns in your code base, feel free to drop
/// an issue / a pull request!
fn is_dependency_code(&self) -> bool {
pub fn is_dependency_code(&self) -> bool {
const SYM_PREFIXES: &[&str] = &[
"std::",
"core::",
Expand Down Expand Up @@ -218,7 +218,7 @@ impl Frame {
/// Post panic frames are frames of a functions called after the actual panic
/// is already in progress and don't contain any useful information for a
/// reader of the backtrace.
fn is_post_panic_code(&self) -> bool {
pub fn is_post_panic_code(&self) -> bool {
const SYM_PREFIXES: &[&str] = &[
"_rust_begin_unwind",
"rust_begin_unwind",
Expand All @@ -239,7 +239,7 @@ impl Frame {

/// Heuristically determine whether a frame is likely to be part of language
/// runtime.
fn is_runtime_init_code(&self) -> bool {
pub fn is_runtime_init_code(&self) -> bool {
const SYM_PREFIXES: &[&str] = &[
"std::rt::lang_start::",
"test::run_test::run_test_inner::",
Expand Down

0 comments on commit 359c1ad

Please sign in to comment.