Skip to content

Commit 985acf2

Browse files
committed
fix nighyly clippy
1 parent b051b3c commit 985acf2

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

invalidstring/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/// uses unsafe to postfix the string with invalid utf8 data
2+
#[allow(invalid_from_utf8_unchecked)]
23
pub fn invalid_utf8(prefix: &str) -> String {
34
let bytes = b"\xc3\x73";
45

src/components/utils/logitems.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff 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")]
162173
mod tests {

src/options.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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())?;

src/strings.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,9 @@ pub const fn branch_name_invalid() -> &'static str {
131131
"[invalid name]"
132132
}
133133
pub 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
}
139139
pub fn stash_popup_title(_key_config: &SharedKeyConfig) -> String {

0 commit comments

Comments
 (0)