mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 02:57:37 +00:00
Removing the TryFrom impl
This commit is contained in:
parent
6b955268d7
commit
5f4eb27a0d
@ -1,7 +1,6 @@
|
||||
use crate::ascii;
|
||||
use crate::borrow::{Borrow, Cow};
|
||||
use crate::cmp::Ordering;
|
||||
use crate::convert::TryFrom;
|
||||
use crate::error::Error;
|
||||
use crate::fmt::{self, Write};
|
||||
use crate::io;
|
||||
@ -854,19 +853,6 @@ impl From<Vec<NonZeroU8>> for CString {
|
||||
}
|
||||
}
|
||||
|
||||
#[unstable(feature = "cstring_from_vec_with_nul", issue = "73179")]
|
||||
impl TryFrom<Vec<u8>> for CString {
|
||||
type Error = FromBytesWithNulError;
|
||||
|
||||
/// See the document about [`from_vec_with_nul`] for more
|
||||
/// informations about the behaviour of this method.
|
||||
///
|
||||
/// [`from_vec_with_nul`]: CString::from_vec_with_nul
|
||||
fn try_from(value: Vec<u8>) -> Result<Self, Self::Error> {
|
||||
Self::from_vec_with_nul(value)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "more_box_slice_clone", since = "1.29.0")]
|
||||
impl Clone for Box<CStr> {
|
||||
#[inline]
|
||||
|
Loading…
Reference in New Issue
Block a user