fix nighyly clippy

This commit is contained in:
extrawurst 2023-11-02 07:45:52 +01:00
parent b051b3c00c
commit 985acf23ef
4 changed files with 15 additions and 3 deletions

View file

@ -1,4 +1,5 @@
/// uses unsafe to postfix the string with invalid utf8 data
#[allow(invalid_from_utf8_unchecked)]
pub fn invalid_utf8(prefix: &str) -> String {
let bytes = b"\xc3\x73";

View file

@ -157,6 +157,17 @@ impl ItemBatch {
}
}
impl<'a> IntoIterator for &'a ItemBatch {
type IntoIter = std::slice::Iter<
'a,
crate::components::utils::logitems::LogEntry,
>;
type Item = &'a crate::components::utils::logitems::LogEntry;
fn into_iter(self) -> Self::IntoIter {
self.iter()
}
}
#[cfg(test)]
#[cfg(feature = "ghemoji")]
mod tests {

View file

@ -145,7 +145,7 @@ impl Options {
fn save_failable(&self) -> Result<()> {
let dir = Self::options_file(&self.repo)?;
let mut file = File::create(&dir)?;
let mut file = File::create(dir)?;
let data =
to_string_pretty(&self.data, PrettyConfig::default())?;
file.write_all(data.as_bytes())?;

View file

@ -131,9 +131,9 @@ pub const fn branch_name_invalid() -> &'static str {
"[invalid name]"
}
pub fn commit_editor_msg(_key_config: &SharedKeyConfig) -> String {
r##"
r"
# Edit your commit message
# Lines starting with '#' will be ignored"##
# Lines starting with '#' will be ignored"
.to_string()
}
pub fn stash_popup_title(_key_config: &SharedKeyConfig) -> String {