We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
PyStringMethods::to_cow
to_str
1 parent bf37c10 commit 73b8541Copy full SHA for 73b8541
src/rust/src/declarative_asn1/encode.rs
@@ -81,10 +81,10 @@ impl asn1::Asn1Writable for AnnotatedTypeObject<'_> {
81
.get()
82
.inner
83
.bind(py)
84
- .to_str()
+ .to_cow()
85
.map_err(|_| asn1::WriteError::AllocationError)?;
86
let printable_string: asn1::PrintableString<'_> =
87
- asn1::PrintableString::new(inner_str)
+ asn1::PrintableString::new(&inner_str)
88
.ok_or(asn1::WriteError::AllocationError)?;
89
write_value(writer, &printable_string)
90
}
0 commit comments