Skip to content
Merged
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
233 changes: 6 additions & 227 deletions Cargo.lock

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

5 changes: 4 additions & 1 deletion cargo-rbmt/src/environment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ pub fn change_to_repo_root(sh: &Shell) {
/// # Arguments
///
/// * `packages` - Optional filter for specific package names. If empty, returns all packages.
pub fn get_crate_dirs(sh: &Shell, packages: &[String]) -> Result<Vec<String>, Box<dyn std::error::Error>> {
pub fn get_crate_dirs(
sh: &Shell,
packages: &[String],
) -> Result<Vec<String>, Box<dyn std::error::Error>> {
let metadata = cmd!(sh, "cargo metadata --no-deps --format-version 1").read()?;
let json: serde_json::Value = serde_json::from_str(&metadata)?;

Expand Down
9 changes: 2 additions & 7 deletions cargo-rbmt/src/lock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,15 @@ use xshell::Shell;
const CARGO_LOCK: &str = "Cargo.lock";

/// Represents the different types of managed lock files.
#[derive(Debug, Clone, Copy, ValueEnum)]
#[derive(Debug, Clone, Copy, ValueEnum, Default)]
pub enum LockFile {
/// Uses minimal versions that satisfy dependency constraints.
Minimal,
/// Uses recent/updated versions of dependencies.
#[default]
Recent,
}

impl Default for LockFile {
fn default() -> Self {
LockFile::Recent
}
}

impl LockFile {
/// Get the filename for this lock file type.
pub fn filename(&self) -> &'static str {
Expand Down
6 changes: 5 additions & 1 deletion cargo-rbmt/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,11 @@ impl TestConfig {
}

/// Run build and test for all crates with the specified toolchain.
pub fn run(sh: &Shell, toolchain: Toolchain, packages: &[String]) -> Result<(), Box<dyn std::error::Error>> {
pub fn run(
sh: &Shell,
toolchain: Toolchain,
packages: &[String],
) -> Result<(), Box<dyn std::error::Error>> {
check_toolchain(sh, toolchain)?;

let crate_dirs = get_crate_dirs(sh, packages)?;
Expand Down
2 changes: 1 addition & 1 deletion releases/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ categories = []
keywords = []
readme = "README.md"
edition = "2021"
rust-version = "1.56.1"
rust-version = "1.74.0"

[dependencies]
anyhow = { version = "1.0.82", default-features = false, features = ["std"] }
Expand Down
Loading