aboutsummaryrefslogtreecommitdiffstats
path: root/components/util/vec.rs
diff options
context:
space:
mode:
authorAnthony Ramine <n.oxyde@gmail.com>2016-07-04 16:40:59 +0200
committerAnthony Ramine <n.oxyde@gmail.com>2016-07-04 16:48:15 +0200
commite77efb93c15a22aadb950d152e905a7ab1d27db9 (patch)
tree9130d064d6dc9b927e19e9f1b67c4e192059b97d /components/util/vec.rs
parenta5b524d5590f84428c61895b418eda7024c8e600 (diff)
downloadservo-e77efb93c15a22aadb950d152e905a7ab1d27db9.tar.gz
servo-e77efb93c15a22aadb950d152e905a7ab1d27db9.zip
Move util::vec::byte_swap to canvas_traits
Diffstat (limited to 'components/util/vec.rs')
-rw-r--r--components/util/vec.rs16
1 files changed, 0 insertions, 16 deletions
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;
- }
-}