Skip to content

Commit 54d36fe

Browse files
author
bors-servo
authored
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 -->
2 parents ebd789f + efffb61 commit 54d36fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

idna/src/uts46.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ include!("uts46_mapping_table.rs");
2323
pub static PUNYCODE_PREFIX: &'static str = "xn--";
2424

2525

26-
#[derive(Debug)]
26+
#[derive(Clone, Copy, Debug)]
2727
struct StringTableSlice {
2828
// Store these as separate fields so the structure will have an
2929
// alignment of 1 and thus pack better into the Mapping enum, below.
@@ -41,7 +41,7 @@ fn decode_slice(slice: &StringTableSlice) -> &'static str {
4141
}
4242

4343
#[repr(u8)]
44-
#[derive(Debug)]
44+
#[derive(Clone, Copy, Debug)]
4545
enum Mapping {
4646
Valid,
4747
Ignored,
@@ -52,6 +52,7 @@ enum Mapping {
5252
DisallowedStd3Mapped(StringTableSlice),
5353
}
5454

55+
#[derive(Clone, Copy)]
5556
struct Range {
5657
from: char,
5758
to: char,

0 commit comments

Comments
 (0)