mirror of
https://github.com/taiki-e/install-action.git
synced 2025-12-27 01:54:13 -05:00
rustfmt: set style_edition = "2024"
This commit is contained in:
@@ -8,7 +8,6 @@ error_on_line_overflow = true
|
|||||||
# Override the default formatting style.
|
# Override the default formatting style.
|
||||||
# See https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81.
|
# See https://internals.rust-lang.org/t/running-rustfmt-on-rust-lang-rust-and-other-rust-lang-repositories/8732/81.
|
||||||
use_small_heuristics = "Max"
|
use_small_heuristics = "Max"
|
||||||
# This is the default of 2024 edition https://github.com/rust-lang/rust/pull/114764.
|
|
||||||
# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3370)
|
# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/3370)
|
||||||
overflow_delimited_expr = true
|
overflow_delimited_expr = true
|
||||||
# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/4991).
|
# This is unstable (tracking issue: https://github.com/rust-lang/rustfmt/issues/4991).
|
||||||
@@ -27,6 +26,7 @@ use_try_shorthand = true
|
|||||||
# Set the default settings again to always apply the proper formatting without
|
# Set the default settings again to always apply the proper formatting without
|
||||||
# being affected by the editor settings.
|
# being affected by the editor settings.
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
style_edition = "2024"
|
||||||
hard_tabs = false
|
hard_tabs = false
|
||||||
newline_style = "Unix"
|
newline_style = "Unix"
|
||||||
tab_spaces = 4
|
tab_spaces = 4
|
||||||
|
|||||||
@@ -11,11 +11,11 @@ use std::{
|
|||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
use anyhow::{bail, Context as _, Result};
|
use anyhow::{Context as _, Result, bail};
|
||||||
use fs_err as fs;
|
use fs_err as fs;
|
||||||
use install_action_internal_codegen::{
|
use install_action_internal_codegen::{
|
||||||
workspace_root, BaseManifest, HostPlatform, Manifest, ManifestDownloadInfo, ManifestRef,
|
BaseManifest, HostPlatform, Manifest, ManifestDownloadInfo, ManifestRef, ManifestTemplate,
|
||||||
ManifestTemplate, ManifestTemplateDownloadInfo, Manifests, Signing, SigningKind, Version,
|
ManifestTemplateDownloadInfo, Manifests, Signing, SigningKind, Version, workspace_root,
|
||||||
};
|
};
|
||||||
use sha2::{Digest as _, Sha256};
|
use sha2::{Digest as _, Sha256};
|
||||||
use spdx::expression::{ExprNode, ExpressionReq, Operator};
|
use spdx::expression::{ExprNode, ExpressionReq, Operator};
|
||||||
@@ -193,7 +193,7 @@ fn main() -> Result<()> {
|
|||||||
|
|
||||||
let version_req: Option<semver::VersionReq> = match version_req {
|
let version_req: Option<semver::VersionReq> = match version_req {
|
||||||
_ if latest_only => {
|
_ if latest_only => {
|
||||||
let req = format!("={}", releases.first_key_value().unwrap().0 .0).parse()?;
|
let req = format!("={}", releases.first_key_value().unwrap().0.0).parse()?;
|
||||||
eprintln!("update manifest for versions '{req}'");
|
eprintln!("update manifest for versions '{req}'");
|
||||||
Some(req)
|
Some(req)
|
||||||
}
|
}
|
||||||
@@ -215,7 +215,7 @@ fn main() -> Result<()> {
|
|||||||
let req = if version_req == "latest" {
|
let req = if version_req == "latest" {
|
||||||
// TODO: this should check all missing versions
|
// TODO: this should check all missing versions
|
||||||
if manifests.map.is_empty() {
|
if manifests.map.is_empty() {
|
||||||
format!("={}", releases.first_key_value().unwrap().0 .0).parse()?
|
format!("={}", releases.first_key_value().unwrap().0.0).parse()?
|
||||||
} else {
|
} else {
|
||||||
format!(">={}", semver_versions.last().unwrap()).parse()?
|
format!(">={}", semver_versions.last().unwrap()).parse()?
|
||||||
}
|
}
|
||||||
@@ -852,7 +852,9 @@ fn get_license_markdown(spdx_expr: &str, repo: &str, default_branch: &str) -> Op
|
|||||||
panic!("Unable to find any license files in the repo for licenses {license_ids:?}");
|
panic!("Unable to find any license files in the repo for licenses {license_ids:?}");
|
||||||
}
|
}
|
||||||
if license_markdowns.len() != len {
|
if license_markdowns.len() != len {
|
||||||
panic!("Unable to find license files in the repo for all licenses {license_ids:?}; found {license_markdowns:?}");
|
panic!(
|
||||||
|
"Unable to find license files in the repo for all licenses {license_ids:?}; found {license_markdowns:?}"
|
||||||
|
);
|
||||||
}
|
}
|
||||||
match op {
|
match op {
|
||||||
None => panic!("op expected"),
|
None => panic!("op expected"),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ use std::{
|
|||||||
|
|
||||||
use anyhow::Result;
|
use anyhow::Result;
|
||||||
use fs_err as fs;
|
use fs_err as fs;
|
||||||
use install_action_internal_codegen::{workspace_root, BaseManifest, Manifests};
|
use install_action_internal_codegen::{BaseManifest, Manifests, workspace_root};
|
||||||
|
|
||||||
const HEADER: &str = "# Tools
|
const HEADER: &str = "# Tools
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user