diff --git a/.github/actions/run-fixtures-test/action.yml b/.github/actions/run-fixtures-test/action.yml index ad9774b1cb..5839612041 100644 --- a/.github/actions/run-fixtures-test/action.yml +++ b/.github/actions/run-fixtures-test/action.yml @@ -18,7 +18,7 @@ runs: using: composite steps: - name: Install toolchain - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@stable - name: Install git-cliff run: cargo install --path git-cliff/ --profile dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd55987c1b..93fd733d7e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install toolchain - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@stable - name: Checkout if: github.event_name != 'pull_request' uses: actions/checkout@v4 @@ -84,7 +84,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install toolchain - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@stable with: components: clippy - name: Checkout @@ -123,7 +123,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install toolchain - uses: dtolnay/rust-toolchain@nightly + uses: dtolnay/rust-toolchain@stable with: components: rustfmt - name: Checkout diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3812f70ec8..cbc8d423d3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,8 +45,6 @@ env UPDATE_EXPECT=1 cargo test 7. Make sure [rustfmt](https://github.com/rust-lang/rustfmt) and [clippy](https://github.com/rust-lang/rust-clippy) don't complain about your changes. -We use the `nightly` channel for `rustfmt` so please set the appropriate settings for your editor/IDE for that. - ## Create a Pull Request 1. Ensure that you updated the documentation and filled the [Pull Request template](./.github/PULL_REQUEST_TEMPLATE.md) according to the changes you made. diff --git a/git-cliff-core/src/changelog.rs b/git-cliff-core/src/changelog.rs index a505a127a5..a53abc8b23 100644 --- a/git-cliff-core/src/changelog.rs +++ b/git-cliff-core/src/changelog.rs @@ -1,13 +1,7 @@ use crate::commit::Commit; -use crate::config::{ - Config, - GitConfig, -}; +use crate::config::{Config, GitConfig}; use crate::error::Result; -use crate::release::{ - Release, - Releases, -}; +use crate::release::{Release, Releases}; #[cfg(feature = "bitbucket")] use crate::remote::bitbucket::BitbucketClient; #[cfg(feature = "gitea")] @@ -18,644 +12,600 @@ use crate::remote::github::GitHubClient; use crate::remote::gitlab::GitLabClient; use crate::template::Template; use std::collections::HashMap; -use std::io::{ - Read, - Write, -}; -use std::time::{ - SystemTime, - UNIX_EPOCH, -}; +use std::io::{Read, Write}; +use std::time::{SystemTime, UNIX_EPOCH}; /// Changelog generator. #[derive(Debug)] pub struct Changelog<'a> { - /// Releases that the changelog will contain. - pub releases: Vec>, - header_template: Option