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 11/// uses unsafe to postfix the string with invalid utf8 data
2+ #[ allow( invalid_from_utf8_unchecked) ]
23pub fn invalid_utf8 ( prefix : & str ) -> String {
34 let bytes = b"\xc3 \x73 " ;
45
Original file line number Diff line number Diff line change @@ -157,6 +157,17 @@ impl ItemBatch {
157157 }
158158}
159159
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+
160171#[ cfg( test) ]
161172#[ cfg( feature = "ghemoji" ) ]
162173mod tests {
Original file line number Diff line number Diff line change @@ -145,7 +145,7 @@ impl Options {
145145 fn save_failable ( & self ) -> Result < ( ) > {
146146 let dir = Self :: options_file ( & self . repo ) ?;
147147
148- let mut file = File :: create ( & dir) ?;
148+ let mut file = File :: create ( dir) ?;
149149 let data =
150150 to_string_pretty ( & self . data , PrettyConfig :: default ( ) ) ?;
151151 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 {
131131 "[invalid name]"
132132}
133133pub fn commit_editor_msg ( _key_config : & SharedKeyConfig ) -> String {
134- r## "
134+ r"
135135# Edit your commit message
136- # Lines starting with '#' will be ignored"##
136+ # Lines starting with '#' will be ignored"
137137 . to_string ( )
138138}
139139pub fn stash_popup_title ( _key_config : & SharedKeyConfig ) -> String {
You can’t perform that action at this time.
0 commit comments