#![allow(dead_code, deprecated, unused_variables, unused_mut)] use std::str::FromStr; fn main() { assert_eq!(FromStr::from_str("true"), Ok(true)); assert_eq!(FromStr::from_str("false"), Ok(false)); assert!(< bool as FromStr >::from_str("not even a boolean").is_err()); }