File tree 2 files changed +22
-0
lines changed
2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change
1
+ ## Pending
2
+
3
+ ### Breaking changes
4
+
5
+ ### Features
6
+ - [ \# 347] ( https://github.com/arkworks-rs/snark/pull/347 ) Add ` into_inner ` function for ` ConstraintSystemRef<F> ` .
7
+
8
+ ### Improvements
9
+
10
+ ### Bug fixes
11
+
12
+
1
13
## v0.2.0
2
14
3
15
### Breaking changes
Original file line number Diff line number Diff line change @@ -767,6 +767,16 @@ impl<F: Field> ConstraintSystemRef<F> {
767
767
}
768
768
}
769
769
770
+ /// Consumes self to return the inner `ConstraintSystem<F>`. Returns
771
+ /// `None` if `Self::CS` is `None` or if any other references to
772
+ /// `Self::CS` exist.
773
+ pub fn into_inner ( self ) -> Option < ConstraintSystem < F > > {
774
+ match self {
775
+ Self :: CS ( a) => Rc :: try_unwrap ( a) . ok ( ) . map ( |s| s. into_inner ( ) ) ,
776
+ Self :: None => None ,
777
+ }
778
+ }
779
+
770
780
/// Obtain an immutable reference to the underlying `ConstraintSystem`.
771
781
///
772
782
/// # Panics
You can’t perform that action at this time.
0 commit comments