Skip to content

Commit efffb61

Browse files
committed
Derive Copy for some structures.
1 parent ebd789f commit efffb61

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)