avm2: Use Box<dyn std::error::Error> for FromWStr impl

We don't currently have an `Activation` available in this
method, and we can't specify a 'gc lifetime without modifying
the trait itself.
This commit is contained in:
Aaron Hill 2022-09-13 16:10:42 -05:00
parent 3e65a554fa
commit c4ce06a500
1 changed files with 2 additions and 1 deletions

View File

@ -35,7 +35,8 @@ impl Display for CompressionAlgorithm {
} }
impl FromWStr for CompressionAlgorithm { impl FromWStr for CompressionAlgorithm {
type Err = Error; // FIXME - this should be an `Error<'gc>`
type Err = Box<dyn std::error::Error>;
fn from_wstr(s: &WStr) -> Result<Self, Self::Err> { fn from_wstr(s: &WStr) -> Result<Self, Self::Err> {
if s == b"zlib" { if s == b"zlib" {