File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -242,9 +242,6 @@ pub const CONTENT_TYPE: &str = "text/plain; version=0.0.4";
242242/// Record `attestor_rpc_requests_total` and `attestor_rpc_request_duration_seconds`
243243/// for the awaited gRPC handler future.
244244///
245- /// The status code is read directly from the handler's `Result`, so no
246- /// header/trailer inspection is needed.
247- ///
248245/// # Errors
249246/// Forwards the inner future's `Err(tonic::Status)` unchanged.
250247pub async fn track_rpc < F , T > ( method : & str , fut : F ) -> Result < T , tonic:: Status >
@@ -262,15 +259,13 @@ where
262259 result
263260}
264261
265- /// Convert a [`tonic::Code`] into a stable, low-cardinality label value
266- /// (`snake_case` derived from the enum variant name).
262+ /// Convert a [`tonic::Code`] into a label value.
267263#[ must_use]
268264pub fn code_label ( code : tonic:: Code ) -> String {
269265 pascal_to_snake ( & format ! ( "{code:?}" ) )
270266}
271267
272- /// Convert a `PascalCase` identifier to `snake_case`.
273- pub ( crate ) fn pascal_to_snake ( s : & str ) -> String {
268+ fn pascal_to_snake ( s : & str ) -> String {
274269 let mut out = String :: with_capacity ( s. len ( ) + 4 ) ;
275270 for ( i, b) in s. bytes ( ) . enumerate ( ) {
276271 if b. is_ascii_uppercase ( ) && i != 0 {
You can’t perform that action at this time.
0 commit comments