Of course it looks like C, it's using a C interface to interface with Ruby. Normal Rust does not look like that. Your comment is quite frankly entirely pointless.
extract_last_path_segment(&str, &str)
This is pure Rust, no C interface involved.