@@ -7,13 +7,13 @@ use std::sync::Arc;
7
7
8
8
use clap:: Parser ;
9
9
use color_eyre:: eyre:: { bail, Result } ;
10
- use email:: backend:: { Backend , BackendBuilder } ;
10
+ use email:: backend:: BackendBuilder ;
11
11
#[ cfg( feature = "imap" ) ]
12
- use email:: imap:: { ImapContextBuilder , ImapContextSync } ;
12
+ use email:: imap:: ImapContextBuilder ;
13
13
#[ cfg( feature = "maildir" ) ]
14
- use email:: maildir:: { MaildirContextBuilder , MaildirContextSync } ;
14
+ use email:: maildir:: MaildirContextBuilder ;
15
15
#[ cfg( feature = "notmuch" ) ]
16
- use email:: notmuch:: { NotmuchContextBuilder , NotmuchContextSync } ;
16
+ use email:: notmuch:: NotmuchContextBuilder ;
17
17
use pimalaya_tui:: cli:: printer:: Printer ;
18
18
use tracing:: { info, instrument} ;
19
19
@@ -56,25 +56,26 @@ impl DoctorAccountCommand {
56
56
#[ cfg( feature = "imap" ) ]
57
57
BackendConfig :: Imap ( imap_config) => {
58
58
printer. log ( "Checking left IMAP integrity…" ) ?;
59
- let ctx = ImapContextBuilder :: new ( left_config. clone ( ) , Arc :: new ( imap_config) ) ;
59
+ let ctx = ImapContextBuilder :: new ( left_config. clone ( ) , Arc :: new ( imap_config) )
60
+ . with_pool_size ( 1 ) ;
60
61
BackendBuilder :: new ( left_config. clone ( ) , ctx)
61
- . check_up :: < Backend < ImapContextSync > > ( )
62
+ . check_up ( )
62
63
. await ?;
63
64
}
64
65
#[ cfg( feature = "maildir" ) ]
65
66
BackendConfig :: Maildir ( maildir_config) => {
66
67
printer. log ( "Checking left Maildir integrity…" ) ?;
67
68
let ctx = MaildirContextBuilder :: new ( left_config. clone ( ) , Arc :: new ( maildir_config) ) ;
68
69
BackendBuilder :: new ( left_config. clone ( ) , ctx)
69
- . check_up :: < Backend < MaildirContextSync > > ( )
70
+ . check_up ( )
70
71
. await ?;
71
72
}
72
73
#[ cfg( feature = "notmuch" ) ]
73
74
BackendConfig :: Notmuch ( notmuch_config) => {
74
75
printer. log ( "Checking left Notmuch integrity…" ) ?;
75
76
let ctx = NotmuchContextBuilder :: new ( left_config. clone ( ) , Arc :: new ( notmuch_config) ) ;
76
77
BackendBuilder :: new ( left_config. clone ( ) , ctx)
77
- . check_up :: < Backend < NotmuchContextSync > > ( )
78
+ . check_up ( )
78
79
. await ?;
79
80
}
80
81
} ;
@@ -93,7 +94,7 @@ impl DoctorAccountCommand {
93
94
printer. log ( "Checking right IMAP integrity…" ) ?;
94
95
let ctx = ImapContextBuilder :: new ( right_config. clone ( ) , Arc :: new ( imap_config) ) ;
95
96
BackendBuilder :: new ( right_config. clone ( ) , ctx)
96
- . check_up :: < Backend < ImapContextSync > > ( )
97
+ . check_up ( )
97
98
. await ?;
98
99
}
99
100
#[ cfg( feature = "maildir" ) ]
@@ -102,7 +103,7 @@ impl DoctorAccountCommand {
102
103
let ctx =
103
104
MaildirContextBuilder :: new ( right_config. clone ( ) , Arc :: new ( maildir_config) ) ;
104
105
BackendBuilder :: new ( right_config. clone ( ) , ctx)
105
- . check_up :: < Backend < MaildirContextSync > > ( )
106
+ . check_up ( )
106
107
. await ?;
107
108
}
108
109
#[ cfg( feature = "notmuch" ) ]
@@ -111,7 +112,7 @@ impl DoctorAccountCommand {
111
112
let ctx =
112
113
NotmuchContextBuilder :: new ( right_config. clone ( ) , Arc :: new ( notmuch_config) ) ;
113
114
BackendBuilder :: new ( right_config. clone ( ) , ctx)
114
- . check_up :: < Backend < NotmuchContextSync > > ( )
115
+ . check_up ( )
115
116
. await ?;
116
117
}
117
118
} ;
0 commit comments