Add a convert::Infallible empty enum, make string::ParseError an alias
This commit is contained in:
parent
e544947278
commit
85f13f0d42
3 changed files with 97 additions and 36 deletions
|
|
@ -78,7 +78,6 @@ use iter::{self, FusedIterator};
|
|||
use ops::{self, Deref};
|
||||
use rc::Rc;
|
||||
use str::FromStr;
|
||||
use string::ParseError;
|
||||
use sync::Arc;
|
||||
|
||||
use ffi::{OsStr, OsString};
|
||||
|
|
@ -1453,7 +1452,7 @@ impl From<String> for PathBuf {
|
|||
|
||||
#[stable(feature = "path_from_str", since = "1.32.0")]
|
||||
impl FromStr for PathBuf {
|
||||
type Err = ParseError;
|
||||
type Err = core::convert::Infallible;
|
||||
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
Ok(PathBuf::from(s))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue