@@ -144,8 +144,10 @@ pub struct RecallBody {
144144 #[ serde( default ) ]
145145 pub include_low_fitness : bool ,
146146 #[ serde( default ) ]
147+ #[ allow( dead_code) ]
147148 pub include_consolidation_sources : bool ,
148149 #[ serde( default ) ]
150+ #[ allow( dead_code) ]
149151 pub consume_handoffs : bool ,
150152}
151153
@@ -207,6 +209,7 @@ pub struct SelfArchiveBody {
207209 #[ serde( default ) ]
208210 pub reason : Option < String > ,
209211 #[ serde( default ) ]
212+ #[ allow( dead_code) ]
210213 pub actor : Option < String > ,
211214}
212215
@@ -347,9 +350,7 @@ fn strip_code(input: &str) -> String {
347350 }
348351 j += 1 ;
349352 }
350- for _ in i..j {
351- out. push ( b' ' ) ;
352- }
353+ out. resize ( out. len ( ) + ( j - i) , b' ' ) ;
353354 i = j;
354355 continue ;
355356 }
@@ -362,9 +363,7 @@ fn strip_code(input: &str) -> String {
362363 if j < bytes. len ( ) && bytes[ j] == b'`' {
363364 j += 1 ;
364365 }
365- for _ in i..j {
366- out. push ( b' ' ) ;
367- }
366+ out. resize ( out. len ( ) + ( j - i) , b' ' ) ;
368367 i = j;
369368 continue ;
370369 }
@@ -765,7 +764,7 @@ pub async fn memory_mentions_wait(
765764 let actor = body. actor . trim ( ) . to_string ( ) ;
766765 let limit = body. limit . unwrap_or ( 20 ) . min ( 200 ) ;
767766 let timeout = body. timeout_seconds . unwrap_or ( 30 ) . min ( 120 ) ;
768- let interval_ms = ( ( body. interval_seconds . unwrap_or ( 1.0 ) ) . max ( 0.1 ) . min ( 5.0 ) * 1000.0 ) as u64 ;
767+ let interval_ms = ( ( body. interval_seconds . unwrap_or ( 1.0 ) ) . clamp ( 0.1 , 5.0 ) * 1000.0 ) as u64 ;
769768
770769 let started = std:: time:: Instant :: now ( ) ;
771770 let deadline = std:: time:: Duration :: from_secs ( timeout) ;
@@ -1207,7 +1206,7 @@ pub async fn memory_self_revise(
12071206 let properties = Value :: Object ( props) ;
12081207
12091208 // Use prior labels (preserves verb kind) plus marker.
1210- let mut labels: Vec < String > = prior. labels . iter ( ) . cloned ( ) . collect ( ) ;
1209+ let mut labels: Vec < String > = prior. labels . to_vec ( ) ;
12111210 if !labels. iter ( ) . any ( |l| l == "MemoryAtom" ) {
12121211 labels. insert ( 0 , "MemoryAtom" . to_string ( ) ) ;
12131212 }
0 commit comments