move pbs-tools/src/str.rs to pbs-client/src/pxar/create.rs
Code is only used there. Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
This commit is contained in:
@ -7,7 +7,6 @@ pub mod lru_cache;
|
||||
pub mod nom;
|
||||
pub mod percent_encoding;
|
||||
pub mod sha;
|
||||
pub mod str;
|
||||
pub mod sync;
|
||||
pub mod ticket;
|
||||
|
||||
|
@ -1,12 +0,0 @@
|
||||
//! String related utilities.
|
||||
|
||||
pub fn strip_ascii_whitespace(line: &[u8]) -> &[u8] {
|
||||
let line = match line.iter().position(|&b| !b.is_ascii_whitespace()) {
|
||||
Some(n) => &line[n..],
|
||||
None => return &[],
|
||||
};
|
||||
match line.iter().rev().position(|&b| !b.is_ascii_whitespace()) {
|
||||
Some(n) => &line[..(line.len() - n)],
|
||||
None => &[],
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user