aboutsummaryrefslogtreecommitdiff
path: root/development/tools/cargo-workspace2/src/cargo/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'development/tools/cargo-workspace2/src/cargo/mod.rs')
-rw-r--r--development/tools/cargo-workspace2/src/cargo/mod.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/development/tools/cargo-workspace2/src/cargo/mod.rs b/development/tools/cargo-workspace2/src/cargo/mod.rs
new file mode 100644
index 000000000000..deb54563d6ba
--- /dev/null
+++ b/development/tools/cargo-workspace2/src/cargo/mod.rs
@@ -0,0 +1,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!(),
+ }
+}