MCPcopy Index your code
hub / github.com/RustPython/RustPython / strerror

Function strerror

crates/vm/src/stdlib/os.rs:2024–2028  ·  view source on GitHub ↗
(e: i32)

Source from the content-addressed store, hash-verified

2022
2023 #[pyfunction]
2024 fn strerror(e: i32) -> String {
2025 unsafe { core::ffi::CStr::from_ptr(libc::strerror(e)) }
2026 .to_string_lossy()
2027 .into_owned()
2028 }
2029
2030 #[pyfunction]
2031 pub fn ftruncate(fd: crt_fd::Borrowed<'_>, length: crt_fd::Offset) -> io::Result<()> {

Callers 1

to_os_error_builderMethod · 0.85

Calls 2

into_ownedMethod · 0.80
to_string_lossyMethod · 0.45

Tested by

no test coverage detected