mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Implement Clone for Copy types.
This commit is contained in:
parent
b6fc83cf2b
commit
903305416a
53 changed files with 105 additions and 105 deletions
|
@ -26,7 +26,7 @@ pub struct BufferMap {
|
|||
}
|
||||
|
||||
/// A key with which to store buffers. It is based on the size of the buffer.
|
||||
#[derive(Eq, Copy)]
|
||||
#[derive(Eq, Copy, Clone)]
|
||||
struct BufferKey([usize; 2]);
|
||||
|
||||
impl Hash for BufferKey {
|
||||
|
|
|
@ -57,7 +57,7 @@ pub struct PaintContext<'a> {
|
|||
pub transient_clip: Option<ClippingRegion>,
|
||||
}
|
||||
|
||||
#[derive(Copy)]
|
||||
#[derive(Copy, Clone)]
|
||||
enum Direction {
|
||||
Top,
|
||||
Left,
|
||||
|
@ -65,7 +65,7 @@ enum Direction {
|
|||
Bottom
|
||||
}
|
||||
|
||||
#[derive(Copy)]
|
||||
#[derive(Copy, Clone)]
|
||||
enum DashSize {
|
||||
DottedBorder = 1,
|
||||
DashedBorder = 3
|
||||
|
|
|
@ -87,7 +87,7 @@ impl GlyphEntry {
|
|||
pub type GlyphId = u32;
|
||||
|
||||
// TODO: unify with bit flags?
|
||||
#[derive(PartialEq, Copy)]
|
||||
#[derive(PartialEq, Copy, Clone)]
|
||||
pub enum BreakType {
|
||||
None,
|
||||
Normal,
|
||||
|
@ -415,7 +415,7 @@ impl<'a> DetailedGlyphStore {
|
|||
|
||||
// This struct is used by GlyphStore clients to provide new glyph data.
|
||||
// It should be allocated on the stack and passed by reference to GlyphStore.
|
||||
#[derive(Copy)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub struct GlyphData {
|
||||
id: GlyphId,
|
||||
advance: Au,
|
||||
|
@ -449,7 +449,7 @@ impl GlyphData {
|
|||
// through glyphs (either for a particular TextRun offset, or all glyphs).
|
||||
// Rather than eagerly assembling and copying glyph data, it only retrieves
|
||||
// values as they are needed from the GlyphStore, using provided offsets.
|
||||
#[derive(Copy)]
|
||||
#[derive(Copy, Clone)]
|
||||
pub enum GlyphInfo<'a> {
|
||||
Simple(&'a GlyphStore, CharIndex),
|
||||
Detail(&'a GlyphStore, CharIndex, u16),
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
#[derive(PartialEq, Eq, Copy)]
|
||||
#[derive(PartialEq, Eq, Copy, Clone)]
|
||||
pub enum CompressionMode {
|
||||
CompressNone,
|
||||
CompressWhitespace,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue