1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25
//! 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!(), } }