From b6101184537b1165cfdd5fc473e04ad4c5b7bffa Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 2 Nov 2020 13:13:32 +0100 Subject: Deny unreachable-pub It's very useful when `pub` is equivalent to "this is crate's public API", let's enforce this! Ideally, we should enforce it for local `cargo test`, and only during CI, but that needs https://github.com/rust-lang/cargo/issues/5034. --- crates/profile/src/hprof.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/profile/src/hprof.rs') diff --git a/crates/profile/src/hprof.rs b/crates/profile/src/hprof.rs index 934cc8e37..8957ea016 100644 --- a/crates/profile/src/hprof.rs +++ b/crates/profile/src/hprof.rs @@ -27,7 +27,7 @@ pub fn init_from(spec: &str) { filter.install(); } -pub type Label = &'static str; +type Label = &'static str; /// This function starts a profiling scope in the current execution stack with a given description. /// It returns a `Profile` struct that measures elapsed time between this method invocation and `Profile` struct drop. @@ -173,7 +173,7 @@ impl ProfileStack { true } - pub fn pop(&mut self, label: Label, detail: Option) { + fn pop(&mut self, label: Label, detail: Option) { let start = self.starts.pop().unwrap(); let duration = start.elapsed(); self.messages.finish(Message { duration, label, detail }); -- cgit v1.2.3