File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,8 @@ fn find_unclosed_quote(s: &str) -> Option<(usize, Quote)> {
496
496
497
497
#[ cfg( test) ]
498
498
mod tests {
499
+ use super :: { Completer , FilenameCompleter } ;
500
+
499
501
#[ test]
500
502
pub fn extract_word ( ) {
501
503
let break_chars = super :: default_break_chars;
@@ -604,16 +606,23 @@ mod tests {
604
606
#[ test]
605
607
pub fn candidate_impls ( ) {
606
608
struct StrCmp ;
607
- impl super :: Completer for StrCmp {
609
+ impl Completer for StrCmp {
608
610
type Candidate = & ' static str ;
609
611
}
610
612
struct RcCmp ;
611
- impl super :: Completer for RcCmp {
613
+ impl Completer for RcCmp {
612
614
type Candidate = std:: rc:: Rc < str > ;
613
615
}
614
616
struct ArcCmp ;
615
- impl super :: Completer for ArcCmp {
617
+ impl Completer for ArcCmp {
616
618
type Candidate = std:: sync:: Arc < str > ;
617
619
}
618
620
}
621
+
622
+ #[ test]
623
+ pub fn completer_impls ( ) {
624
+ struct Wrapper < T : Completer > ( T ) ;
625
+ let boxed = Box :: new ( FilenameCompleter :: new ( ) ) ;
626
+ let _ = Wrapper ( boxed) ;
627
+ }
619
628
}
Original file line number Diff line number Diff line change @@ -1032,7 +1032,7 @@ impl Renderer for PosixRenderer {
1032
1032
}
1033
1033
// position the cursor within the line
1034
1034
if cursor. col > 0 {
1035
- write ! ( self . buffer, "\r \x1b [{}C" , cursor. col) . unwrap ( ) ;
1035
+ write ! ( self . buffer, "\r \x1b [{}C" , cursor. col) ? ;
1036
1036
} else {
1037
1037
self . buffer . push ( '\r' ) ;
1038
1038
}
You can’t perform that action at this time.
0 commit comments