Skip to content

Commit

Permalink
refactor: refine code to fix cargo update break issues and warnings (#…
Browse files Browse the repository at this point in the history
…399)

refactor: refine code to fix cargo update break issues.
  • Loading branch information
Peefy committed Feb 3, 2023
1 parent 36e3d37 commit 6c172ba
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions kclvm/runtime/src/datetime/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub extern "C" fn kclvm_datetime_today(
_args: *const kclvm_value_ref_t,
_kwargs: *const kclvm_value_ref_t,
) -> *const kclvm_value_ref_t {
let s = Local::today().to_string();
let s = Local::now().to_string();
return ValueRef::str(s.as_ref()).into_raw();
}

Expand Down Expand Up @@ -59,6 +59,6 @@ pub extern "C" fn kclvm_datetime_date(
_args: *const kclvm_value_ref_t,
_kwargs: *const kclvm_value_ref_t,
) -> *const kclvm_value_ref_t {
let s = Local::today().to_string();
let s = Local::now().to_string();
return ValueRef::str(s.as_ref()).into_raw();
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
filename=cwd + "/main.k",
line_no=1,
col_no=1,
arg_msg="got {str:str(2)}"
arg_msg="got {str(A):str(2)}"
)
],
arg_msg="expect {str(A)|str(B):int}, got {str:str(2)}"
arg_msg="expect {str(A)|str(B):int}, got {str(A):str(2)}"
),
file=sys.stdout
)
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
filename=cwd + "/main.k",
line_no=1,
col_no=1,
arg_msg="got {str:int(1)}"
arg_msg="got {str(C):int(1)}"
)
],
arg_msg="expect {str(A)|str(B):int}, got {str:int(1)}"
arg_msg="expect {str(A)|str(B):int}, got {str(C):int(1)}"
),
file=sys.stdout
)

0 comments on commit 6c172ba

Please sign in to comment.