@@ -90,11 +90,14 @@ mod durability_impl {
9090
9191 use crate :: {
9292 durability:: { DurableTTS , ExtendedAdvancedTrait } ,
93- golem:: tts:: { advanced:: {
94- AudioSample , Guest , GuestLongFormOperation , GuestPronunciationLexicon , LanguageCode ,
95- LongFormOperation , LongFormResult , OperationStatus , PronunciationEntry ,
96- PronunciationLexicon , TtsError , Voice , VoiceDesignParams ,
97- } , types:: SynthesisMetadata } ,
93+ golem:: tts:: {
94+ advanced:: {
95+ AudioSample , Guest , GuestLongFormOperation , GuestPronunciationLexicon ,
96+ LanguageCode , LongFormOperation , LongFormResult , OperationStatus ,
97+ PronunciationEntry , PronunciationLexicon , TtsError , Voice , VoiceDesignParams ,
98+ } ,
99+ types:: SynthesisMetadata ,
100+ } ,
98101 init_logging,
99102 } ;
100103
@@ -363,6 +366,7 @@ mod durability_impl {
363366 }
364367 }
365368
369+ #[ allow( clippy:: large_enum_variant) ]
366370 enum DurableLongFormOperationState < Impl : Guest > {
367371 Live {
368372 operation : Impl :: LongFormOperation ,
@@ -491,7 +495,7 @@ mod durability_impl {
491495 Some ( task_id. clone ( ) ) ,
492496 ) ?;
493497
494- ( status. clone ( ) , Some ( new_longform_synthesis) )
498+ ( * status, Some ( new_longform_synthesis) )
495499 }
496500 _ => unreachable ! ( ) ,
497501 }
@@ -505,14 +509,14 @@ mod durability_impl {
505509 } ) ;
506510 }
507511
508- let _ = durability. persist_infallible ( NoInput , status. clone ( ) ) ;
512+ let _ = durability. persist_infallible ( NoInput , status) ;
509513 Ok ( status)
510514 } else {
511515 let replay: OperationStatus = durability. replay_infallible ( ) ;
512516 let mut state = self . state . borrow_mut ( ) ;
513517 match & mut * state {
514518 Some ( DurableLongFormOperationState :: Replay { status, .. } ) => {
515- * status = replay. clone ( ) ;
519+ * status = replay;
516520 }
517521 _ => {
518522 unreachable ! ( )
@@ -553,7 +557,7 @@ mod durability_impl {
553557 Some ( task_id. clone ( ) ) ,
554558 ) ?;
555559
556- ( progress. clone ( ) , Some ( new_longform_synthesis) )
560+ ( * progress, Some ( new_longform_synthesis) )
557561 }
558562 _ => unreachable ! ( ) ,
559563 }
@@ -837,24 +841,25 @@ mod durability_impl {
837841 ) ;
838842 init_logging ( ) ;
839843 if durability. is_live ( ) {
840- let longform_operation = with_persistence_level ( PersistenceLevel :: PersistNothing , || {
841- Impl :: unwrappered_synthesize_long_form (
842- content. clone ( ) ,
843- voice. clone ( ) ,
844- chapter_breaks. clone ( ) ,
845- None ,
846- )
847- } ) ?;
844+ let longform_operation =
845+ with_persistence_level ( PersistenceLevel :: PersistNothing , || {
846+ Impl :: unwrappered_synthesize_long_form (
847+ content. clone ( ) ,
848+ voice. clone ( ) ,
849+ chapter_breaks. clone ( ) ,
850+ None ,
851+ )
852+ } ) ?;
848853
849854 let task_id = with_persistence_level ( PersistenceLevel :: PersistNothing , || {
850855 longform_operation. get_task_id ( )
851856 } ) ?;
852857
853858 let _ = durability. persist_infallible ( NoInput , task_id. clone ( ) ) ;
854859
855- Ok ( LongFormOperation :: new ( DurableLongFormOperation :: < Impl > :: live (
856- longform_operation,
857- ) ) )
860+ Ok ( LongFormOperation :: new (
861+ DurableLongFormOperation :: < Impl > :: live ( longform_operation) ,
862+ ) )
858863 } else {
859864 let task_id: String = durability. replay_infallible ( ) ;
860865
0 commit comments