Avoid StringWriter cast and string format

This commit is contained in:
Wildan M
2026-05-20 09:10:25 +07:00
parent b07babc03c
commit 4a7f2d80ff
7 changed files with 32 additions and 25 deletions
+2 -2
View File
@@ -1479,7 +1479,7 @@ pub unsafe extern "C" fn vsnprintf(
) -> c_int {
unsafe {
printf::printf(
&mut platform::StringWriter(s.cast::<u8>(), n),
&mut platform::StringWriter(s, n),
CStr::from_ptr(format),
ap,
)
@@ -1496,7 +1496,7 @@ pub unsafe extern "C" fn snprintf(
) -> c_int {
unsafe {
printf::printf(
&mut platform::StringWriter(s.cast::<u8>(), n),
&mut platform::StringWriter(s, n),
CStr::from_ptr(format),
__valist.as_va_list(),
)