Sha256: 66db55d15d0e2808bffe4cde7cd1d99bda999b26cbe40bb6b5e43b94f9b631d2
Contents?: true
Size: 524 Bytes
Versions: 29
Compression:
Stored size: 524 Bytes
Contents
#[cfg(no_str_strip_prefix)] // rustc <1.45 pub(crate) trait StripPrefixExt { fn strip_prefix(&self, ch: char) -> Option<&str>; } #[cfg(no_str_strip_prefix)] impl StripPrefixExt for str { fn strip_prefix(&self, ch: char) -> Option<&str> { if self.starts_with(ch) { Some(&self[ch.len_utf8()..]) } else { None } } } pub(crate) use crate::alloc::vec::Vec; #[cfg(no_alloc_crate)] // rustc <1.36 pub(crate) mod alloc { pub use std::alloc; pub use std::vec; }
Version data entries
29 entries across 29 versions & 1 rubygems