rust-error-handling
Installation
SKILL.md
Rust Error Handling
Guide for effective error handling in Rust.
Quick Start
Use Result<T, E> for operations that can fail:
use std::fs;
use std::io;
fn read_username(path: &str) -> Result<String, io::Error> {
let content = fs::read_to_string(path)?;
Ok(content.trim().to_string())
}