File tree 4 files changed +22
-1
lines changed
4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -114,6 +114,9 @@ impl CommitList {
114
114
self . marked . len ( )
115
115
}
116
116
117
+ // Clippy wants this to be const in nightly, which is not possible.
118
+ // Disable check to make clippy pass:
119
+ #[ allow( clippy:: missing_const_for_fn) ]
117
120
///
118
121
pub fn marked ( & self ) -> & [ ( usize , CommitId ) ] {
119
122
& self . marked
Original file line number Diff line number Diff line change @@ -40,6 +40,11 @@ impl KeyConfig {
40
40
Ok ( Self { keys, symbols } )
41
41
}
42
42
43
+ // Clippy wants this to be const in nightly
44
+ // This can't really be const, as deref into &str is not const, even
45
+ // in nightly.
46
+ // Disable clippy warning to build on nightly.
47
+ #[ allow( clippy:: missing_const_for_fn) ]
43
48
fn get_key_symbol ( & self , k : KeyCode ) -> & str {
44
49
match k {
45
50
KeyCode :: Enter => & self . symbols . enter ,
@@ -106,6 +111,11 @@ impl KeyConfig {
106
111
}
107
112
}
108
113
114
+ // Clippy wants this to be const in nightly
115
+ // This can't really be const, as deref into &str is not const, even
116
+ // in nightly.
117
+ // Disable clippy warning to build on nightly.
118
+ #[ allow( clippy:: missing_const_for_fn) ]
109
119
fn get_modifier_hint ( & self , modifier : KeyModifiers ) -> & str {
110
120
match modifier {
111
121
KeyModifiers :: CONTROL => & self . symbols . control ,
Original file line number Diff line number Diff line change @@ -41,6 +41,10 @@ struct SyntaxFileBlame {
41
41
}
42
42
43
43
impl SyntaxFileBlame {
44
+ // Clippy wants this to be const in nightly.
45
+ // This can't really be const, as deref into Path is not const.
46
+ // Disable clippy warning to build on nightly.
47
+ #[ allow( clippy:: missing_const_for_fn) ]
44
48
fn path ( & self ) -> & str {
45
49
& self . file_blame . path
46
50
}
Original file line number Diff line number Diff line change @@ -167,9 +167,13 @@ impl SyntaxText {
167
167
} )
168
168
}
169
169
170
+ // Clippy wants this to be const in nightly.
171
+ // This can't really be const, as deref into Path is not const.
172
+ // Disable clippy warning to build on nightly.
173
+ #[ allow( clippy:: missing_const_for_fn) ]
170
174
///
171
175
pub fn path ( & self ) -> & Path {
172
- & self . path
176
+ self . path . as_path ( )
173
177
}
174
178
}
175
179
You can’t perform that action at this time.
0 commit comments