aboutsummaryrefslogtreecommitdiff
path: root/font/src/darwin/byte_order.rs
diff options
context:
space:
mode:
authorChristian Duerr <chrisduerr@users.noreply.github.com>2018-07-21 17:17:41 +0000
committerGitHub <noreply@github.com>2018-07-21 17:17:41 +0000
commitf50ca1a54c94fe324d22d985c1acae1ff7c16a80 (patch)
tree7fc2e79f7dccf512fe71f841ef5434e0b1d2b5d7 /font/src/darwin/byte_order.rs
parentb05ad74fe6d42ce0f913e02ef633ca119fc0b43e (diff)
downloadr-alacritty-f50ca1a54c94fe324d22d985c1acae1ff7c16a80.tar.gz
r-alacritty-f50ca1a54c94fe324d22d985c1acae1ff7c16a80.tar.bz2
r-alacritty-f50ca1a54c94fe324d22d985c1acae1ff7c16a80.zip
Scrollback cleanup
There were some unneeded codeblocks and TODO/XXX comments in the code that have been removed. All issues marked with TODO/XXX have either been already resolved or tracking issues exist.
Diffstat (limited to 'font/src/darwin/byte_order.rs')
-rw-r--r--font/src/darwin/byte_order.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/font/src/darwin/byte_order.rs b/font/src/darwin/byte_order.rs
index 29efb5b1..2ea46fcb 100644
--- a/font/src/darwin/byte_order.rs
+++ b/font/src/darwin/byte_order.rs
@@ -24,7 +24,7 @@ pub const kCGBitmapByteOrder32Host: u32 = kCGBitmapByteOrder32Little;
pub const kCGBitmapByteOrder32Host: u32 = kCGBitmapByteOrder32Big;
#[cfg(target_endian = "little")]
-pub fn extract_rgb(bytes: Vec<u8>) -> Vec<u8> {
+pub fn extract_rgb(bytes: &[u8]) -> Vec<u8> {
let pixels = bytes.len() / 4;
let mut rgb = Vec::with_capacity(pixels * 3);
@@ -32,7 +32,7 @@ pub fn extract_rgb(bytes: Vec<u8>) -> Vec<u8> {
let offset = i * 4;
rgb.push(bytes[offset + 2]);
rgb.push(bytes[offset + 1]);
- rgb.push(bytes[offset + 0]);
+ rgb.push(bytes[offset]);
}
rgb