Browse Source

Auto merge of #393 - frewsxcv:frewsxcv-copy, r=KiChjang

Derive `Copy` for some structures.

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/rust-url/393)
<!-- Reviewable:end -->
bors-servo 9 years ago
parent
commit
54d36fedea
1 changed files with 3 additions and 2 deletions
  1. 3 2
      idna/src/uts46.rs

+ 3 - 2
idna/src/uts46.rs

@@ -23,7 +23,7 @@ include!("uts46_mapping_table.rs");
 pub static PUNYCODE_PREFIX: &'static str = "xn--";
 
 
-#[derive(Debug)]
+#[derive(Clone, Copy, Debug)]
 struct StringTableSlice {
     // Store these as separate fields so the structure will have an
     // alignment of 1 and thus pack better into the Mapping enum, below.
@@ -41,7 +41,7 @@ fn decode_slice(slice: &StringTableSlice) -> &'static str {
 }
 
 #[repr(u8)]
-#[derive(Debug)]
+#[derive(Clone, Copy, Debug)]
 enum Mapping {
     Valid,
     Ignored,
@@ -52,6 +52,7 @@ enum Mapping {
     DisallowedStd3Mapped(StringTableSlice),
 }
 
+#[derive(Clone, Copy)]
 struct Range {
     from: char,
     to: char,