Do you think it would be a good idea to have infallible() along with unwrap() on Option and Result?
The rationale is that often you know that an operation will never fail. Yet there is no ergonomic way to convey that assumption to the reader of the code. unwrap() is often used as a quick and dirty workaround when you have an option and it is recomended in Rust Book to try to replace unwrap() with proper error handling. expect() on the other hand can convey the meaning but it's verbose.
Compare the options:
serde_json::to_string(&vec![1,2]).infallible() serde_json::to_string(&vec![1,2]).expect("Always serializes correctly") serde_json::to_string(&vec![1,2]).unwrap()