diff options
Diffstat (limited to 'components/util')
-rw-r--r-- | components/util/lib.rs | 1 | ||||
-rw-r--r-- | components/util/vec.rs | 16 |
2 files changed, 0 insertions, 17 deletions
diff --git a/components/util/lib.rs b/components/util/lib.rs index 3a5c362f443..215f8e999cc 100644 --- a/components/util/lib.rs +++ b/components/util/lib.rs @@ -46,7 +46,6 @@ pub mod str; pub mod thread; pub mod thread_state; pub mod tid; -pub mod vec; #[allow(unsafe_code)] pub mod workqueue; #[cfg(feature = "servo")] diff --git a/components/util/vec.rs b/components/util/vec.rs deleted file mode 100644 index 2aa6b7d4a41..00000000000 --- a/components/util/vec.rs +++ /dev/null @@ -1,16 +0,0 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - -// TODO(pcwalton): Speed up with SIMD, or better yet, find some way to not do this. -pub fn byte_swap(data: &mut [u8]) { - let length = data.len(); - // FIXME(rust #27741): Range::step_by is not stable yet as of this writing. - let mut i = 0; - while i < length { - let r = data[i + 2]; - data[i + 2] = data[i + 0]; - data[i + 0] = r; - i += 4; - } -} |