Skip to content

Commit cc1f8e2

Browse files
lvkvcpu
authored andcommitted
Eagerly derive Copy where possible
1 parent 5855e24 commit cc1f8e2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

rcgen/src/certificate.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ impl GeneralSubtree {
968968
}
969969
}
970970

971-
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
971+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
972972
#[allow(missing_docs)]
973973
/// CIDR subnet, as per [RFC 4632](https://tools.ietf.org/html/rfc4632)
974974
///
@@ -1080,7 +1080,7 @@ pub fn date_time_ymd(year: i32, month: u8, day: u8) -> OffsetDateTime {
10801080
}
10811081

10821082
/// Whether the certificate is allowed to sign other certificates
1083-
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
1083+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
10841084
pub enum IsCa {
10851085
/// The certificate can only sign itself
10861086
NoCa,
@@ -1123,7 +1123,7 @@ impl IsCa {
11231123
///
11241124
/// Sets an optional upper limit on the length of the intermediate certificate chain
11251125
/// length allowed for this CA certificate (not including the end entity certificate).
1126-
#[derive(Debug, PartialEq, Eq, Hash, Clone)]
1126+
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
11271127
pub enum BasicConstraints {
11281128
/// No constraint
11291129
Unconstrained,

rcgen/src/sign_algo.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ use crate::ring_like::signature::{self, EcdsaSigningAlgorithm, EdDSAParameters,
1010
use crate::Error;
1111

1212
#[cfg(feature = "crypto")]
13-
#[derive(Clone)]
13+
#[derive(Clone, Copy)]
1414
pub(crate) enum SignAlgo {
1515
EcDsa(&'static EcdsaSigningAlgorithm),
1616
EdDsa(&'static EdDSAParameters),
1717
Rsa(&'static dyn RsaEncoding),
1818
}
1919

20-
#[derive(Clone, PartialEq, Eq, Hash)]
20+
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
2121
pub(crate) enum SignatureAlgorithmParams {
2222
/// Omit the parameters
2323
None,

0 commit comments

Comments
 (0)