mirror of
https://github.com/gitui-org/gitui.git
synced 2026-10-12 02:14:16 +00:00
fix nighyly clippy
This commit is contained in:
@@ -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";
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
+1
-1
@@ -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())?;
|
||||
|
||||
+2
-2
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user