From bed5a3856b71c5d7d6c1633b2d32af70b6a6561c Mon Sep 17 00:00:00 2001 From: TornaxO7 <50843046+TornaxO7@users.noreply.github.com> Date: Sat, 28 May 2022 14:10:38 +0200 Subject: [PATCH] improve gitignore files (#385) * modified gitignore * fixing gitignore * reomving the himalaya.iml file * applied cargo fmt * fixed typo in .gitignore and removed an entry in it * adding gitignore to cli/ * reducing .gitignore in cli to one line --- .gitignore | 42 ++++++++++++++++++++++++++++++++++--- cli/.gitignore | 1 + cli/src/msg/parts_entity.rs | 3 ++- cli/src/ui/table.rs | 3 ++- 4 files changed, 44 insertions(+), 5 deletions(-) create mode 100644 cli/.gitignore diff --git a/.gitignore b/.gitignore index 2d69402..e4a6d9f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,46 @@ # Cargo build directory -/target +target/ +debug/ + +# These are backup files generated by rustfmt +**/*.rs.bk + +# MSVC Windows builds of rustc generate these, which store debugging information +*.pdb # Nix build directory -/result -/result-lib +result +result-* # Direnv /.envrc /.direnv + + +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 +.idea/ + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# SonarLint plugin +.idea/sonarlint/ + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +## Others +.metadata/ diff --git a/cli/.gitignore b/cli/.gitignore new file mode 100644 index 0000000..03314f7 --- /dev/null +++ b/cli/.gitignore @@ -0,0 +1 @@ +Cargo.lock diff --git a/cli/src/msg/parts_entity.rs b/cli/src/msg/parts_entity.rs index 8c30f4f..9b371a0 100644 --- a/cli/src/msg/parts_entity.rs +++ b/cli/src/msg/parts_entity.rs @@ -55,7 +55,8 @@ impl Parts { part: &'a mailparse::ParsedMail<'a>, ) -> Result { let mut parts = vec![]; - if part.subparts.is_empty() && part.get_headers().get_first_value("content-type").is_none() { + if part.subparts.is_empty() && part.get_headers().get_first_value("content-type").is_none() + { let content = part.get_body().unwrap_or_default(); parts.push(Part::TextPlain(TextPlainPart { content })) } else { diff --git a/cli/src/ui/table.rs b/cli/src/ui/table.rs index 2a9f22a..5342699 100644 --- a/cli/src/ui/table.rs +++ b/cli/src/ui/table.rs @@ -134,7 +134,8 @@ impl Print for Cell { .context(format!(r#"cannot apply colors to cell "{}""#, self.value))?; // Writes the colorized cell to stdout - write!(writer, "{}", self.value).context(format!(r#"cannot print cell "{}""#, self.value))?; + write!(writer, "{}", self.value) + .context(format!(r#"cannot print cell "{}""#, self.value))?; Ok(writer.reset()?) } }