fix: A/B test 15 (parsing channel shortsLockupViewModel)
This commit is contained in:
parent
ed08f9ff9a
commit
7972df0df4
8 changed files with 14241 additions and 23 deletions
|
|
@ -469,6 +469,19 @@ impl<'de> DeserializeAs<'de, TextComponent> for AttributedText {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'de> DeserializeAs<'de, String> for AttributedText {
|
||||
fn deserialize_as<D>(deserializer: D) -> Result<String, D::Error>
|
||||
where
|
||||
D: Deserializer<'de>,
|
||||
{
|
||||
let components: TextComponents = AttributedText::deserialize_as(deserializer)?;
|
||||
Ok(components
|
||||
.0
|
||||
.into_iter()
|
||||
.fold(String::new(), |acc, c| acc + c.as_str()))
|
||||
}
|
||||
}
|
||||
|
||||
impl TryFrom<TextComponent> for crate::model::ChannelId {
|
||||
type Error = ();
|
||||
|
||||
|
|
|
|||
Reference in a new issue