File tree Expand file tree Collapse file tree 2 files changed +3
-10
lines changed
Expand file tree Collapse file tree 2 files changed +3
-10
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -388,17 +388,17 @@ impl Externals for MockRuntime {
388388 } ;
389389 self . events . push ( event. clone ( ) ) ;
390390
391- // 如果 log name 是 MyCoverage, 则导出log内容
391+ // If the log name is MyCoverage, export the log content.
392392 let my_coverage_event_name = "MyCoverage" ;
393393 let first_topic = event. topics [ 0 ] . clone ( ) ;
394394
395- // 第一个字节是event字符串长度
395+ // The first byte is the length of the event string.
396396 if String :: from_utf8 ( first_topic[ 1 ..] . to_vec ( ) ) . unwrap ( ) == * my_coverage_event_name
397397 {
398398 let file_name = "out.mygcna" ;
399399 let mut file =
400400 File :: create ( file_name) . expect ( "mygcna coverage file create failed" ) ;
401- // desc_o 是datastream编码后的长度,头部需要读取leb128长度
401+ // ` desc_o` is the length encoded by the data stream, and the header needs to read the length of leb128.
402402 let coverage_file_bytes = match nano_leb128:: SLEB128 :: read_from ( & desc_o) {
403403 Ok ( ( _, len_bytes_len) ) => & desc_o[ len_bytes_len..] ,
404404 Err ( _) => unreachable ! (
You can’t perform that action at this time.
0 commit comments