Login
You're viewing the mstdn.social public feed.
  • Jun 30, 2026, 8:19 PM

    intuition check: what would you expect this Rust snippet to print?

    ```
    use itertools::Itertools;

    fn main() {
    let p = std::path::Path::new("/a/b/c");
    let s = p.components().map(|c| c.as_os_str().to_string_lossy()).join("/");
    println!("s={s:?}");
    }
    ```

    💬 4🔄 0⭐ 2

Replies