☰
Debian Codegraph
@
1.2.1-1
/
/
src
/
platform
/
other.rs
☽
☼
src/platform/other.rs
code
plain
raw
symbols
SCIP
MIT
or
Apache-2.0
2016-2018 Kathryn Long <
[email protected]
>
debian/copyright
1
use
std::ffi::{
OsStr
,
OsString
};
2
3
pub
(
crate
)
fn
os_to_wide
(
s
: &
OsStr
) ->
Vec
<
u16
> {
4
s.
to_string_lossy
().
encode_utf16
().
collect
()
5
}
6
7
pub
(
crate
)
fn
os_from_wide
(
s
: &[
u16
]) ->
OsString
{
8
OsString
::
from
(
String
::
from_utf16_lossy
(s))
9
}