Skip to content

chore(deps): update rust crate insta to v1.43.0 - abandoned #155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 2 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/gh-workflow/src/cargo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl From<Cargo> for Step<Run> {
let mut command = vec!["cargo".to_string()];

if let Some(toolchain) = value.toolchain {
command.push(format!("+{}", toolchain));
command.push(format!("+{toolchain}"));
}

command.push(value.command);
Expand Down
14 changes: 7 additions & 7 deletions crates/gh-workflow/src/ctx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,25 +202,25 @@ impl fmt::Display for Step {
Step::Root => write!(f, ""),
Step::Select { name, object } => {
if matches!(**object, Step::Root) {
write!(f, "{}", name)
write!(f, "{name}")
} else {
write!(f, "{}.{}", object, name)
write!(f, "{object}.{name}")
}
}
Step::Eq { left, right } => {
write!(f, "{} == {}", left, right)
write!(f, "{left} == {right}")
}
Step::And { left, right } => {
write!(f, "{} && {}", left, right)
write!(f, "{left} && {right}")
}
Step::Or { left, right } => {
write!(f, "{} || {}", left, right)
write!(f, "{left} || {right}")
}
Step::Literal(value) => {
write!(f, "'{}'", value)
write!(f, "'{value}'")
}
Step::Concat { left, right } => {
write!(f, "{}{}", left, right)
write!(f, "{left}{right}")
}
}
}
Expand Down
7 changes: 3 additions & 4 deletions crates/gh-workflow/src/generate.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
//! This module provides functionality to customize generation of the GitHub
//! Actions workflow files.

use std::io::ErrorKind;
use std::path::PathBuf;
use std::process::Command;

Expand Down Expand Up @@ -70,7 +69,7 @@ impl Generate {
}
Err(Error::MissingWorkflowFile(path)) => {
std::fs::create_dir_all(path.parent().ok_or(Error::IO(
std::io::Error::new(ErrorKind::Other, "Invalid parent dir(s) path"),
std::io::Error::other("Invalid parent dir(s) path"),
))?)?;
std::fs::write(path.clone(), content)?;
println!("Generated workflow file: {}", path.display());
Expand Down Expand Up @@ -113,13 +112,13 @@ fn organize_job_dependency(mut workflow: Workflow) -> Workflow {
job_ids.push(id.to_owned());
} else {
// Create a job-id for the job
let id = format!("job-{}", job_id);
let id = format!("job-{job_id}");

// Add job id as the dependency
job_ids.push(id.clone());

// Insert the missing job into the new_jobs
new_jobs.insert(format!("job-{}", job_id), job.clone());
new_jobs.insert(format!("job-{job_id}"), job.clone());

job_id += 1;
}
Expand Down
14 changes: 7 additions & 7 deletions crates/gh-workflow/src/rust_flag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ impl Display for RustFlags {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
match self {
RustFlags::Lint(name, lint) => match lint {
Lint::Allow => write!(f, "-A{}", name),
Lint::Warn => write!(f, "-W{}", name),
Lint::Deny => write!(f, "-D{}", name),
Lint::Forbid => write!(f, "-F{}", name),
Lint::Codegen => write!(f, "-C{}", name),
Lint::Experiment => write!(f, "-Z{}", name),
Lint::Allow => write!(f, "-A{name}"),
Lint::Warn => write!(f, "-W{name}"),
Lint::Deny => write!(f, "-D{name}"),
Lint::Forbid => write!(f, "-F{name}"),
Lint::Codegen => write!(f, "-C{name}"),
Lint::Experiment => write!(f, "-Z{name}"),
},
RustFlags::Combine(lhs, rhs) => write!(f, "{} {}", lhs, rhs),
RustFlags::Combine(lhs, rhs) => write!(f, "{lhs} {rhs}"),
}
}
}
Expand Down
18 changes: 9 additions & 9 deletions crates/gh-workflow/src/toolchain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl Display for Component {
Component::Rustfmt => "rustfmt",
Component::RustDoc => "rust-doc",
};
write!(f, "{}", val)
write!(f, "{val}")
}
}

Expand All @@ -64,7 +64,7 @@ impl Display for Arch {
Arch::Arm => "arm",
Arch::Wasm32 => "wasm32",
};
write!(f, "{}", val)
write!(f, "{val}")
}
}

Expand All @@ -82,7 +82,7 @@ impl Display for Vendor {
Vendor::Apple => "apple",
Vendor::PC => "pc",
};
write!(f, "{}", val)
write!(f, "{val}")
}
}

Expand All @@ -102,7 +102,7 @@ impl Display for System {
System::Linux => "linux",
System::Darwin => "darwin",
};
write!(f, "{}", val)
write!(f, "{val}")
}
}

Expand All @@ -122,7 +122,7 @@ impl Display for Abi {
Abi::Msvc => "msvc",
Abi::Musl => "musl",
};
write!(f, "{}", val)
write!(f, "{val}")
}
}

Expand Down Expand Up @@ -205,10 +205,10 @@ impl From<Toolchain> for Step<Use> {
Version::Stable => "stable".to_string(),
Version::Nightly => "nightly".to_string(),
Version::Custom((major, minor, patch)) => {
format!("{}.{}.{}", major, minor, patch)
format!("{major}.{minor}.{patch}")
}
})
.reduce(|acc, a| format!("{}, {}", acc, a));
.reduce(|acc, a| format!("{acc}, {a}"));

let mut input = Input::default();

Expand All @@ -233,7 +233,7 @@ impl From<Toolchain> for Step<Use> {
.components
.iter()
.map(|c| c.to_string())
.reduce(|acc, a| format!("{}, {}", acc, a))
.reduce(|acc, a| format!("{acc}, {a}"))
.unwrap_or_default();

input = input.add("components", components);
Expand All @@ -252,7 +252,7 @@ impl From<Toolchain> for Step<Use> {
let cache_workspaces = value
.cache_workspaces
.iter()
.fold("".to_string(), |acc, a| format!("{}\n{}", acc, a));
.fold("".to_string(), |acc, a| format!("{acc}\n{a}"));

input = input.add("cache-workspaces", cache_workspaces);
}
Expand Down
Loading