mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Remove unused ByteString::bytes() and its unit test.
This commit is contained in:
parent
80fc666734
commit
aea03b2f92
3 changed files with 0 additions and 25 deletions
|
@ -8,7 +8,6 @@ use std::ascii::AsciiExt;
|
|||
use std::borrow::ToOwned;
|
||||
use std::fmt;
|
||||
use std::hash::{Hash, Hasher};
|
||||
use std::mem;
|
||||
use std::ops;
|
||||
use std::ops::{Deref, DerefMut};
|
||||
use std::str;
|
||||
|
@ -31,12 +30,6 @@ impl ByteString {
|
|||
str::from_utf8(&self.0).ok()
|
||||
}
|
||||
|
||||
/// Returns ownership of the underlying Vec<u8> and copies an empty
|
||||
/// vec in its place
|
||||
pub fn bytes(&mut self) -> Vec<u8> {
|
||||
mem::replace(&mut self.0, Vec::new())
|
||||
}
|
||||
|
||||
/// Returns the length.
|
||||
pub fn len(&self) -> usize {
|
||||
self.0.len()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue