How to Use Nested Paths (use std

:{io, fs}) in Rust

Use curly braces in a use statement to import multiple items like io and fs from the std crate at once.

Use curly braces to group multiple items from the same parent module in a single use statement. This syntax imports io and fs from the std crate simultaneously.

use std::{io, fs};

This allows you to call functions like io::stdin() and fs::read_to_string() directly without repeating std::.