問題描述
use std::str::FromStr;
pub struct Wrapper<'a>(&'a str);
impl FromStr for Wrapper<'_> {
type Err = ();
fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(Wrapper(s))
}
}
use std::str::FromStr;
pub struct Wrapper<'a>(&'a str);
impl FromStr for Wrapper<'_> {
type Err = ();
fn from_str(s: &str) -> Result<Self, Self::Err> {
Ok(Wrapper(s))
}
}