File tree Expand file tree Collapse file tree 2 files changed +4
-0
lines changed
src/rust/src/declarative_asn1 Expand file tree Collapse file tree 2 files changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -138,6 +138,7 @@ impl asn1::Asn1Writable for AnnotatedTypeObject<'_> {
138138 let val: & pyo3:: Bound < ' _ , PrintableString > = value
139139 . cast ( )
140140 . map_err ( |_| asn1:: WriteError :: AllocationError ) ?;
141+ // TODO: Switch this to `to_str()` once our minimum version is py310+
141142 let inner_str = val
142143 . get ( )
143144 . inner
@@ -152,6 +153,7 @@ impl asn1::Asn1Writable for AnnotatedTypeObject<'_> {
152153 let val: & pyo3:: Bound < ' _ , IA5String > = value
153154 . cast ( )
154155 . map_err ( |_| asn1:: WriteError :: AllocationError ) ?;
156+ // TODO: Switch this to `to_str()` once our minimum version is py310+
155157 let inner_str = val
156158 . get ( )
157159 . inner
Original file line number Diff line number Diff line change @@ -143,6 +143,7 @@ impl PrintableString {
143143 #[ new]
144144 #[ pyo3( signature = ( inner, ) ) ]
145145 fn new ( py : pyo3:: Python < ' _ > , inner : pyo3:: Py < pyo3:: types:: PyString > ) -> pyo3:: PyResult < Self > {
146+ // TODO: Switch this to `to_str()` once our minimum version is py310+
146147 if Asn1PrintableString :: new ( & inner. to_cow ( py) ?) . is_none ( ) {
147148 return Err ( pyo3:: exceptions:: PyValueError :: new_err ( format ! (
148149 "invalid PrintableString: {inner}"
@@ -176,6 +177,7 @@ impl IA5String {
176177 #[ new]
177178 #[ pyo3( signature = ( inner, ) ) ]
178179 fn new ( py : pyo3:: Python < ' _ > , inner : pyo3:: Py < pyo3:: types:: PyString > ) -> pyo3:: PyResult < Self > {
180+ // TODO: Switch this to `to_str()` once our minimum version is py310+
179181 if Asn1IA5String :: new ( & inner. to_cow ( py) ?) . is_none ( ) {
180182 return Err ( pyo3:: exceptions:: PyValueError :: new_err ( format ! (
181183 "invalid IA5String: {inner}"
You can’t perform that action at this time.
0 commit comments