diff options
author | John Hodge (Mutabah) <tpg@mutabah.net> | 2019-11-03 09:12:38 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-03 09:12:38 +0800 |
commit | 4d1a508a808b66146ef1071af225262a2fc2ff5d (patch) | |
tree | dff8c166acedd3983ab67a041e939980e8c4190f | |
parent | 15773561e40ca5c8cffe0a618c544b6cfdc5ad7e (diff) | |
parent | 77567d0cd3bbfb791c7ef7ef7bee6151f37427db (diff) | |
download | mrust-4d1a508a808b66146ef1071af225262a2fc2ff5d.tar.gz |
Merge pull request #121 from elichai/2019-10-package-rename
Add support for crates renaming
-rw-r--r-- | tools/minicargo/manifest.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/minicargo/manifest.cpp b/tools/minicargo/manifest.cpp index ac9c9cb2..c385072d 100644 --- a/tools/minicargo/manifest.cpp +++ b/tools/minicargo/manifest.cpp @@ -580,10 +580,15 @@ void PackageRef::fill_from_kv(bool was_added, const TomlKeyValue& key_val, size_ this->m_features.push_back( sv.as_string() ); } } + else if ( attr == "package" ) + { + assert(key_val.path.size() == base_idx+1); + this->m_name = key_val.value.as_string(); + } else { // TODO: Error - throw ::std::runtime_error(::format("ERROR: Unkown depencency attribute `", attr, "` on dependency `", this->m_name, "`")); + throw ::std::runtime_error(::format("ERROR: Unkown dependency attribute `", attr, "` on dependency `", this->m_name, "`")); } } } |