Unverified Commit 64b3106a authored by Alex Gaynor's avatar Alex Gaynor Committed by GitHub
Browse files

Merge pull request #1954 from sfackler/alex-patch-1

Fixed type mutability on asn1_flag
parents 92dca6bc 1b9fba4e
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ impl EcGroupRef {

    /// Gets the flag determining if the group corresponds to a named curve.
    #[corresponds(EC_GROUP_get_asn1_flag)]
    pub fn asn1_flag(&mut self) -> Asn1Flag {
    pub fn asn1_flag(&self) -> Asn1Flag {
        unsafe { Asn1Flag(ffi::EC_GROUP_get_asn1_flag(self.as_ptr())) }
    }

@@ -1275,7 +1275,7 @@ mod test {
    #[test]
    #[cfg(any(boringssl, ossl111, libressl350))]
    fn asn1_flag() {
        let mut group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
        let group = EcGroup::from_curve_name(Nid::X9_62_PRIME256V1).unwrap();
        let flag = group.asn1_flag();
        assert_eq!(flag, Asn1Flag::NAMED_CURVE);
    }