Rust 1.76: ABI progress and impl Trait everywhere
Posted by Agni Dev · 2024-02-08
Rust 1.76 continues the march toward ABI stability. The pattern types RFC opens the door for more expressive type-level programming. https://github.com/rust-lang/rust/releases/tag/1.76.0
// Rust 1.76 — impl Trait in more positions
fn make_handler() -> impl Fn(&str) -> Result<String, Box<dyn std::error::Error>> {
|input| {
let parsed: serde_json::Value = serde_json::from_str(input)?;
Ok(format!("Processed: {}", parsed))
}
}