MCPcopy Index your code
hub / github.com/encounter/objdiff / check_path_buf

Function check_path_buf

objdiff-core/src/config/path.rs:19–25  ·  view source on GitHub ↗
(
    path: std::path::PathBuf,
)

Source from the content-addressed store, hash-verified

17/// Checks if the path is valid UTF-8 and returns it as a [`Utf8NativePathBuf`].
18#[cfg(feature = "std")]
19pub fn check_path_buf(
20 path: std::path::PathBuf,
21) -> Result<typed_path::Utf8PlatformPathBuf, alloc::string::FromUtf8Error> {
22 typed_path::Utf8PlatformPathBuf::from_bytes_path_buf(typed_path::PlatformPathBuf::from(
23 path.into_os_string().into_encoded_bytes(),
24 ))
25}
26
27#[cfg(feature = "serde")]
28pub mod unix_path_serde_option {

Callers 4

mainFunction · 0.85
format_pathFunction · 0.85
queueMethod · 0.85
runFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected