My personal project and infrastructure archive
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
nomicon/development/tools/cargo-workspace2/src/cargo/mod.rs

25 lines
573 B

//! A set of models directly related to `Cargo.toml` files
mod deps;
pub use deps::Dependency;
mod error;
pub use error::CargoError;
mod parser;
pub(crate) use parser::{get_members, parse_dependencies, parse_root_toml, parse_toml};
mod gen;
pub(crate) use gen::{sync, update_dependency};
pub(crate) type Result<T> = std::result::Result<T, CargoError>;
use toml_edit::Value;
/// Turn a toml Value into a String, panic if it fails
pub(self) fn v_to_s(v: &Value) -> String {
match v {
Value::String(s) => s.to_string(),
_ => unreachable!(),
}
}