mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Fix warnings: use clone_from_slice instead of copy_memory
This commit is contained in:
parent
bccb46c70a
commit
7267163f49
4 changed files with 4 additions and 5 deletions
|
@ -13,7 +13,6 @@ use ipc_channel::router::ROUTER;
|
|||
use layers::platform::surface::NativeSurface;
|
||||
use offscreen_gl_context::{ColorAttachmentType, GLContext, GLContextAttributes};
|
||||
use std::borrow::ToOwned;
|
||||
use std::slice::bytes::copy_memory;
|
||||
use std::sync::mpsc::{Sender, channel};
|
||||
use util::task::spawn_named;
|
||||
use util::vec::byte_swap;
|
||||
|
@ -365,7 +364,7 @@ impl WebGLPaintTask {
|
|||
let dst_start = y * stride;
|
||||
let src_start = (height - y - 1) * stride;
|
||||
let src_slice = &orig_pixels[src_start .. src_start + stride];
|
||||
copy_memory(&src_slice[..stride], &mut pixels[dst_start .. dst_start + stride]);
|
||||
(&mut pixels[dst_start .. dst_start + stride]).clone_from_slice(&src_slice[..stride]);
|
||||
}
|
||||
|
||||
// rgba -> bgra
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue