mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update rustc to 00b112c45a604fa6f4b59af2a40c9deeadfdb7c6/rustc-1.0.0-dev.
This commit is contained in:
parent
ff8cbff810
commit
95fc29fa0d
255 changed files with 3550 additions and 3362 deletions
|
@ -3,12 +3,11 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use std::collections::HashMap;
|
||||
use std::collections::hash_map::{Occupied, Vacant};
|
||||
use std::collections::hash_map::Entry::{Occupied, Vacant};
|
||||
use geom::size::Size2D;
|
||||
use layers::platform::surface::NativePaintingGraphicsContext;
|
||||
use layers::layers::LayerBuffer;
|
||||
use std::hash::Hash;
|
||||
use std::hash::sip::SipState;
|
||||
use std::hash::{Hash, Hasher, Writer};
|
||||
use std::mem;
|
||||
|
||||
/// This is a struct used to store buffers when they are not in use.
|
||||
|
@ -27,11 +26,11 @@ pub struct BufferMap {
|
|||
}
|
||||
|
||||
/// A key with which to store buffers. It is based on the size of the buffer.
|
||||
#[deriving(Eq, Copy)]
|
||||
struct BufferKey([uint, ..2]);
|
||||
#[derive(Eq, Copy)]
|
||||
struct BufferKey([uint; 2]);
|
||||
|
||||
impl Hash for BufferKey {
|
||||
fn hash(&self, state: &mut SipState) {
|
||||
impl<H: Hasher+Writer> Hash<H> for BufferKey {
|
||||
fn hash(&self, state: &mut H) {
|
||||
let BufferKey(ref bytes) = *self;
|
||||
bytes.as_slice().hash(state);
|
||||
}
|
||||
|
@ -91,7 +90,7 @@ impl BufferMap {
|
|||
entry.into_mut().buffers.push(new_buffer);
|
||||
}
|
||||
Vacant(entry) => {
|
||||
entry.set(BufferValue {
|
||||
entry.insert(BufferValue {
|
||||
buffers: vec!(new_buffer),
|
||||
last_action: *counter,
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue