I currently have to use this to format a .expect()
message:
fn main() {
let x: Option<&str> = None;
x.expect(&format!("the world is ending: {}", "foo")[..]);
}
Is there a less verbose way?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…