@@ -57,7 +57,7 @@ pub(crate) struct AssistCtx<'a> {
57
57
should_compute_edit : bool ,
58
58
}
59
59
60
- impl < ' a > Clone for AssistCtx < ' a > {
60
+ impl Clone for AssistCtx < ' _ > {
61
61
fn clone ( & self ) -> Self {
62
62
AssistCtx {
63
63
db : self . db ,
@@ -80,8 +80,7 @@ impl<'a> AssistCtx<'a> {
80
80
label : impl Into < String > ,
81
81
f : impl FnOnce ( & mut ActionBuilder ) ,
82
82
) -> Option < Assist > {
83
- let label = AssistLabel { label : label. into ( ) , id } ;
84
- assert ! ( label. label. chars( ) . nth( 0 ) . unwrap( ) . is_uppercase( ) ) ;
83
+ let label = AssistLabel :: new ( label. into ( ) , id) ;
85
84
86
85
let assist = if self . should_compute_edit {
87
86
let action = {
@@ -103,7 +102,7 @@ impl<'a> AssistCtx<'a> {
103
102
label : impl Into < String > ,
104
103
f : impl FnOnce ( ) -> Vec < ActionBuilder > ,
105
104
) -> Option < Assist > {
106
- let label = AssistLabel { label : label. into ( ) , id } ;
105
+ let label = AssistLabel :: new ( label. into ( ) , id) ;
107
106
let assist = if self . should_compute_edit {
108
107
let actions = f ( ) ;
109
108
assert ! ( !actions. is_empty( ) , "Assist cannot have no" ) ;
0 commit comments