This repository was archived by the owner on Aug 18, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed
Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 7575 - name : 打包Linux/macOS
7676 if : matrix.os != 'windows-latest'
7777 run : |
78- cp target/release/codenothing release-package/
78+ cp target/release/CodeNothing release-package/
7979 # 如果examples目录存在,则复制
8080 if [ -d "examples" ]; then
8181 cp -r examples release-package/
Original file line number Diff line number Diff line change 11use :: std:: collections:: HashMap ;
2- use :: std:: io:: { self , Write } ;
2+ use :: std:: io:: { self , Write as IoWrite } ;
33use :: std:: fmt:: Write as FmtWrite ;
44
55// 导入通用库
@@ -9,8 +9,6 @@ use cn_common::string::process_escape_chars;
99// 命名空间函数
1010mod std {
1111 use super :: * ;
12- use :: std:: fmt:: Write ;
13- use :: std:: io:: Write ;
1412
1513 // 打印字符串到标准输出
1614 pub fn cn_print ( args : Vec < String > ) -> String {
@@ -83,7 +81,7 @@ mod std {
8381 // 整数格式化
8482 if let Some ( arg) = format_args. next ( ) {
8583 if let Ok ( num) = arg. parse :: < i32 > ( ) {
86- let _ = write ! ( result, "{}" , num) ;
84+ let _ = FmtWrite :: write_fmt ( & mut result, format_args ! ( "{}" , num) ) ;
8785 } else {
8886 result. push_str ( "%d" ) ;
8987 }
@@ -96,7 +94,7 @@ mod std {
9694 // 浮点数格式化
9795 if let Some ( arg) = format_args. next ( ) {
9896 if let Ok ( num) = arg. parse :: < f64 > ( ) {
99- let _ = write ! ( result, "{}" , num) ;
97+ let _ = FmtWrite :: write_fmt ( & mut result, format_args ! ( "{}" , num) ) ;
10098 } else {
10199 result. push_str ( "%f" ) ;
102100 }
You can’t perform that action at this time.
0 commit comments