Return `InteractionError` instead of `std::io::Error` from `InteractionEnvironment::emit_message`

finchie
Aug 8, 2025, 8:19 AM
XSRT5QWX3WE6RQC2Y3NTAEVV5GQDGDR6UCQMNW2EFLSNRRRKNPIAC

Dependencies

  • [2] IZ67IMRI Move prompt message to initial constructor
  • [3] IXBE5Q6T Implement `InteractionEnvironment::print_message`
  • [4] BC22FLOQ Move interaction constructors back to individual types
  • [5] JUV7C6ET Create initial prototype of `fluent_embed_interaction`
  • [6] 7YOM2QEF Move interaction constructors from individual types to implementations on `InteractionEnvironment`
  • [7] KFFAQIZU Rename `InteractionEnvironment::print_message` to `emit_message`
  • [8] EKXWNEPK Rename `Localize::message_for_locale` to `Localize::localize_for`

Change contents

  • edit in l10n_embed_interaction/src/lib.rs at line 23
    [3.9772]
    [3.9772]
    }
    impl From<std::io::Error> for InteractionError {
    fn from(value: std::io::Error) -> Self {
    InteractionError::IO(value)
    }
  • replacement in l10n_embed_interaction/src/lib.rs at line 58
    [3.7][3.0:88]()
    pub fn emit_message<L: Localize>(&self, message: L) -> Result<(), std::io::Error> {
    [3.7]
    [3.3706]
    pub fn emit_message<L: Localize>(&self, message: L) -> Result<(), InteractionError> {
  • replacement in l10n_embed_interaction/src/lib.rs at line 60
    [3.3733][3.545:602]()
    .println(message.localize_for(&self.locale))
    [3.3733]
    [2.2864]
    .println(message.localize_for(&self.locale))?;
    Ok(())