mirror of
https://github.com/clap-rs/clap
synced 2024-11-14 00:27:13 +00:00
Remove _StrExt
This commit is contained in:
parent
f69ec92a83
commit
756e95388f
2 changed files with 0 additions and 17 deletions
|
@ -4,7 +4,6 @@ mod argstr;
|
|||
mod fnv;
|
||||
mod graph;
|
||||
mod id;
|
||||
mod strext;
|
||||
|
||||
pub use self::fnv::Key;
|
||||
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
pub(crate) trait _StrExt {
|
||||
fn _is_char_boundary(&self, index: usize) -> bool;
|
||||
}
|
||||
|
||||
impl _StrExt for str {
|
||||
#[inline]
|
||||
fn _is_char_boundary(&self, index: usize) -> bool {
|
||||
if index == self.len() {
|
||||
return true;
|
||||
}
|
||||
|
||||
self.as_bytes()
|
||||
.get(index)
|
||||
.map_or(false, |&b| b < 128 || b >= 192)
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue