MCPcopy Index your code
hub / github.com/AI45Lab/Code / panic_payload_to_string

Function panic_payload_to_string

core/src/ordered_parallel.rs:114–122  ·  view source on GitHub ↗
(payload: Box<dyn Any + Send>)

Source from the content-addressed store, hash-verified

112}
113
114fn panic_payload_to_string(payload: Box<dyn Any + Send>) -> String {
115 if let Some(message) = payload.downcast_ref::<&str>() {
116 return (*message).to_string();
117 }
118 if let Some(message) = payload.downcast_ref::<String>() {
119 return message.clone();
120 }
121 "unknown panic payload".to_string()
122}
123
124#[cfg(test)]
125mod tests {

Callers 1

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected