@@ -172,7 +172,7 @@ impl TuiApp {
172172 }
173173
174174 /// 配置服务
175- pub fn with_service ( mut self , service : impl Send + Sync + ' static ) -> Self {
175+ pub fn with_service ( self , _service : impl Send + Sync + ' static ) -> Self {
176176 // 这里可以添加各种服务
177177 self
178178 }
@@ -236,7 +236,7 @@ impl TuiApp {
236236 }
237237
238238 /// 打开屏幕
239- fn open_screen ( & mut self , screen_type : ScreenType ) -> TuiResult < ( ) > {
239+ fn open_screen ( & mut self , _screen_type : ScreenType ) -> TuiResult < ( ) > {
240240 // TODO: 使用 ScreenFactory 创建屏幕
241241 // 这里暂时使用占位符实现
242242 Ok ( ( ) )
@@ -248,7 +248,7 @@ impl TuiApp {
248248 let results = self . task_manager . poll_completed ( ) ;
249249 for ( id, result) in results {
250250 match result {
251- crate :: tui:: traits:: TaskResult :: Success ( data ) => {
251+ crate :: tui:: traits:: TaskResult :: Success ( _data ) => {
252252 log:: info!( "Task {:?} completed successfully" , id) ;
253253 }
254254 crate :: tui:: traits:: TaskResult :: Failed ( error) => {
@@ -284,7 +284,7 @@ impl TuiApp {
284284 self . render_notifications ( frame) ;
285285
286286 // 渲染屏幕(如果有活动屏幕)
287- if let Some ( screen ) = self . screen_manager . current ( ) {
287+ if let Some ( _screen ) = self . screen_manager . current ( ) {
288288 // TODO: 渲染屏幕
289289 }
290290
@@ -298,7 +298,7 @@ impl TuiApp {
298298 }
299299
300300 /// 渲染通知
301- fn render_notifications ( & self , frame : & mut Frame ) {
301+ fn render_notifications ( & self , _frame : & mut Frame ) {
302302 let notifications = self . notification_manager . active_notifications ( ) ;
303303 if !notifications. is_empty ( ) {
304304 // TODO: 实现通知渲染
@@ -417,16 +417,16 @@ impl Application for TuiApp {
417417 Event :: Key ( key_event) if key_event. kind == KeyEventKind :: Press => {
418418 // 处理按键
419419 let result = self . handle_key_event ( key_event)
420- . map_err ( |e| io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ?;
420+ . map_err ( |e| io:: Error :: other ( e. to_string ( ) ) ) ?;
421421
422422 // 处理动作
423423 if let HandleResult :: Action ( action) = result {
424424 self . handle_action ( action)
425- . map_err ( |e| io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ?;
425+ . map_err ( |e| io:: Error :: other ( e. to_string ( ) ) ) ?;
426426 } else if let HandleResult :: NeedsRender = result {
427427 // 需要重新渲染
428428 self . render ( & mut terminal)
429- . map_err ( |e| io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ?;
429+ . map_err ( |e| io:: Error :: other ( e. to_string ( ) ) ) ?;
430430 }
431431 }
432432 _ => { }
@@ -435,14 +435,14 @@ impl Application for TuiApp {
435435
436436 // 处理单次迭代(异步任务等)
437437 let should_continue = self . tick ( )
438- . map_err ( |e| io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ?;
438+ . map_err ( |e| io:: Error :: other ( e. to_string ( ) ) ) ?;
439439 if !should_continue {
440440 break ;
441441 }
442442
443443 // 渲染界面
444444 self . render ( & mut terminal)
445- . map_err ( |e| io:: Error :: new ( io :: ErrorKind :: Other , e. to_string ( ) ) ) ?;
445+ . map_err ( |e| io:: Error :: other ( e. to_string ( ) ) ) ?;
446446 }
447447
448448 // 恢复终端状态
@@ -458,7 +458,7 @@ impl Application for TuiApp {
458458// ============================================================================
459459
460460/// 创建默认的构建上下文
461- pub fn create_build_context ( app : & TuiApp ) -> BuildContext {
461+ pub fn create_build_context ( app : & TuiApp ) -> BuildContext < ' _ > {
462462 BuildContext :: new ( )
463463 . with_id_generator ( & app. id_generator )
464464 . with_services ( & app. services )
0 commit comments