mirror of
https://github.com/chatmail/core.git
synced 2026-04-20 15:06:30 +03:00
Rename to_str() -> as_str() to match stdlib naming convention
The function does a cast and does not create a new objects. The stdlib convention is to use to_*() for functions which return new objects and as_*() for functions which keep referring to the same data but using a different type. Follow that convention.
This commit is contained in:
@@ -360,7 +360,7 @@ pub unsafe fn dc_array_get_string(
|
||||
}
|
||||
let cnt = (*array).count as usize;
|
||||
let slice = std::slice::from_raw_parts((*array).array, cnt);
|
||||
let sep = to_str(sep);
|
||||
let sep = as_str(sep);
|
||||
|
||||
let res = slice
|
||||
.iter()
|
||||
|
||||
Reference in New Issue
Block a user