File tree Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Expand file tree Collapse file tree 4 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1
1
/// uses unsafe to postfix the string with invalid utf8 data
2
+ #[ allow( invalid_from_utf8_unchecked) ]
2
3
pub fn invalid_utf8 ( prefix : & str ) -> String {
3
4
let bytes = b"\xc3 \x73 " ;
4
5
Original file line number Diff line number Diff line change @@ -157,6 +157,17 @@ impl ItemBatch {
157
157
}
158
158
}
159
159
160
+ impl < ' a > IntoIterator for & ' a ItemBatch {
161
+ type IntoIter = std:: slice:: Iter <
162
+ ' a ,
163
+ crate :: components:: utils:: logitems:: LogEntry ,
164
+ > ;
165
+ type Item = & ' a crate :: components:: utils:: logitems:: LogEntry ;
166
+ fn into_iter ( self ) -> Self :: IntoIter {
167
+ self . iter ( )
168
+ }
169
+ }
170
+
160
171
#[ cfg( test) ]
161
172
#[ cfg( feature = "ghemoji" ) ]
162
173
mod tests {
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ impl Options {
145
145
fn save_failable ( & self ) -> Result < ( ) > {
146
146
let dir = Self :: options_file ( & self . repo ) ?;
147
147
148
- let mut file = File :: create ( & dir) ?;
148
+ let mut file = File :: create ( dir) ?;
149
149
let data =
150
150
to_string_pretty ( & self . data , PrettyConfig :: default ( ) ) ?;
151
151
file. write_all ( data. as_bytes ( ) ) ?;
Original file line number Diff line number Diff line change @@ -131,9 +131,9 @@ pub const fn branch_name_invalid() -> &'static str {
131
131
"[invalid name]"
132
132
}
133
133
pub fn commit_editor_msg ( _key_config : & SharedKeyConfig ) -> String {
134
- r## "
134
+ r"
135
135
# Edit your commit message
136
- # Lines starting with '#' will be ignored"##
136
+ # Lines starting with '#' will be ignored"
137
137
. to_string ( )
138
138
}
139
139
pub fn stash_popup_title ( _key_config : & SharedKeyConfig ) -> String {
You can’t perform that action at this time.
0 commit comments