Skip to content

Commit d7b2d03

Browse files
authored
refactor(clippy): apply doc_markdown and ignored_unit_patterns lint (#887)
1 parent a394f88 commit d7b2d03

File tree

7 files changed

+11
-11
lines changed

7 files changed

+11
-11
lines changed

git-cliff-core/src/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ pub struct CommitParser {
327327
pub pattern: Option<Regex>,
328328
}
329329

330-
/// TextProcessor, e.g. for modifying commit messages.
330+
/// `TextProcessor`, e.g. for modifying commit messages.
331331
#[derive(Debug, Clone, Serialize, Deserialize)]
332332
pub struct TextProcessor {
333333
/// Regex for matching a text to replace.

git-cliff-core/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ pub enum Error {
7171
/// value matchers.
7272
#[error("Field error: `{0}`")]
7373
FieldError(String),
74-
/// Error that may occur while parsing a SemVer version or version
74+
/// Error that may occur while parsing a `SemVer` version or version
7575
/// requirement.
7676
#[error("Semver error: `{0}`")]
7777
SemverError(#[from] semver::Error),
@@ -84,7 +84,7 @@ pub enum Error {
8484
#[error("HTTP client with middleware error: `{0}`")]
8585
#[cfg(feature = "remote")]
8686
HttpClientMiddlewareError(#[from] reqwest_middleware::Error),
87-
/// A possible error when converting a HeaderValue from a string or byte
87+
/// A possible error when converting a `HeaderValue` from a string or byte
8888
/// slice.
8989
#[error("HTTP header error: `{0}`")]
9090
#[cfg(feature = "remote")]

git-cliff-core/src/remote/gitlab.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ pub struct GitLabMergeRequest {
135135
pub id: i64,
136136
/// Iid
137137
pub iid: i64,
138-
/// ProjectId
138+
/// Project Id
139139
pub project_id: i64,
140140
/// Title
141141
pub title: String,
@@ -153,7 +153,7 @@ pub struct GitLabMergeRequest {
153153
pub merge_commit_sha: Option<String>,
154154
/// Squash Commit Sha
155155
pub squash_commit_sha: Option<String>,
156-
/// WebUrl
156+
/// Web Url
157157
pub web_url: String,
158158
/// Labels
159159
pub labels: Vec<String>,

git-cliff-core/src/repo.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,12 +310,12 @@ impl Repository {
310310
None
311311
}
312312

313-
/// Decide whether to include tag
313+
/// Decide whether to include tag.
314314
///
315315
/// `head_commit` is the `latest` commit to generate changelog. It can be a
316316
/// branch head or a detached head. `tag_commit` is a tagged commit. If the
317-
/// commit is in the descendant graph of the head_commit or is the
318-
/// head_commit itself, Changelog should include the tag.
317+
/// commit is in the descendant graph of the `head_commit` or is the
318+
/// `head_commit` itself, Changelog should include the tag.
319319
fn should_include_tag(
320320
&self,
321321
head_commit: &Commit,

git-cliff/src/bin/completions.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::io::Result;
99

1010
/// Shell completions can be created with:
1111
/// `cargo run --bin git-cliff-completions`
12-
/// in a directory specified by the environment variable OUT_DIR.
12+
/// in a directory specified by the environment variable `OUT_DIR`.
1313
/// See <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
1414
fn main() -> Result<()> {
1515
let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not set");

git-cliff/src/bin/mangen.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use std::path::PathBuf;
88

99
/// Man page can be created with:
1010
/// `cargo run --bin git-cliff-mangen`
11-
/// in a directory specified by the environment variable OUT_DIR.
11+
/// in a directory specified by the environment variable `OUT_DIR`.
1212
/// See <https://doc.rust-lang.org/cargo/reference/environment-variables.html>
1313
fn main() -> Result<()> {
1414
let out_dir = env::var("OUT_DIR").expect("OUT_DIR is not set");

git-cliff/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn main() -> Result<()> {
3434

3535
// Run git-cliff
3636
let exit_code = match git_cliff::run(args) {
37-
Ok(_) => 0,
37+
Ok(()) => 0,
3838
Err(e) => {
3939
log::error!("{}", e);
4040
1

0 commit comments

Comments
 (0)