mirror of
https://github.com/gitui-org/gitui
synced 2026-05-24 01:18:21 +00:00
fix nighyly clippy
This commit is contained in:
parent
b051b3c00c
commit
985acf23ef
4 changed files with 15 additions and 3 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
/// uses unsafe to postfix the string with invalid utf8 data
|
/// uses unsafe to postfix the string with invalid utf8 data
|
||||||
|
#[allow(invalid_from_utf8_unchecked)]
|
||||||
pub fn invalid_utf8(prefix: &str) -> String {
|
pub fn invalid_utf8(prefix: &str) -> String {
|
||||||
let bytes = b"\xc3\x73";
|
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(test)]
|
||||||
#[cfg(feature = "ghemoji")]
|
#[cfg(feature = "ghemoji")]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ impl Options {
|
||||||
fn save_failable(&self) -> Result<()> {
|
fn save_failable(&self) -> Result<()> {
|
||||||
let dir = Self::options_file(&self.repo)?;
|
let dir = Self::options_file(&self.repo)?;
|
||||||
|
|
||||||
let mut file = File::create(&dir)?;
|
let mut file = File::create(dir)?;
|
||||||
let data =
|
let data =
|
||||||
to_string_pretty(&self.data, PrettyConfig::default())?;
|
to_string_pretty(&self.data, PrettyConfig::default())?;
|
||||||
file.write_all(data.as_bytes())?;
|
file.write_all(data.as_bytes())?;
|
||||||
|
|
|
||||||
|
|
@ -131,9 +131,9 @@ pub const fn branch_name_invalid() -> &'static str {
|
||||||
"[invalid name]"
|
"[invalid name]"
|
||||||
}
|
}
|
||||||
pub fn commit_editor_msg(_key_config: &SharedKeyConfig) -> String {
|
pub fn commit_editor_msg(_key_config: &SharedKeyConfig) -> String {
|
||||||
r##"
|
r"
|
||||||
# Edit your commit message
|
# Edit your commit message
|
||||||
# Lines starting with '#' will be ignored"##
|
# Lines starting with '#' will be ignored"
|
||||||
.to_string()
|
.to_string()
|
||||||
}
|
}
|
||||||
pub fn stash_popup_title(_key_config: &SharedKeyConfig) -> String {
|
pub fn stash_popup_title(_key_config: &SharedKeyConfig) -> String {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue