diff --git a/program-runtime/src/log_collector.rs b/program-runtime/src/log_collector.rs index ead575ddf..8c801b883 100644 --- a/program-runtime/src/log_collector.rs +++ b/program-runtime/src/log_collector.rs @@ -54,11 +54,9 @@ impl LogCollector { ..Self::default() })) } -} -impl From for Vec { - fn from(log_collector: LogCollector) -> Self { - log_collector.messages + pub fn into_messages(self) -> Vec { + self.messages } } @@ -114,7 +112,7 @@ pub(crate) mod tests { lc.log("x"); } - let logs: Vec<_> = lc.into(); + let logs: Vec<_> = lc.into_messages(); assert_eq!(logs.len(), LOG_MESSAGES_BYTES_LIMIT); for log in logs.iter().take(LOG_MESSAGES_BYTES_LIMIT - 1) { assert_eq!(*log, "x".to_string()); diff --git a/runtime/src/bank.rs b/runtime/src/bank.rs index 3ea37b1d0..5c4a58601 100644 --- a/runtime/src/bank.rs +++ b/runtime/src/bank.rs @@ -4895,7 +4895,7 @@ impl Bank { let log_messages: Option = log_collector.and_then(|log_collector| { Rc::try_unwrap(log_collector) - .map(|log_collector| log_collector.into_inner().into()) + .map(|log_collector| log_collector.into_inner().into_messages()) .ok() });