Skip to content

Commit

Permalink
Get description attribute for packages from json.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim committed Jan 24, 2012
1 parent dfae487 commit 65840f3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/cargo/cargo.rs
Expand Up @@ -270,8 +270,15 @@ fn load_one_source_package(&src: source, p: map::hashmap<str, json::json>) {
}
_ { }
}
// TODO: make this *actually* get the description from the .rc file.
let description = "This package's description.";

let description = alt p.find("description") {
some(json::string(_n)) { _n }
_ {
warn("Malformed source json: " + src.name + " (missing description)");
ret;
}
};

vec::grow(src.packages, 1u, {
// source: _source(src),
name: name,
Expand Down

0 comments on commit 65840f3

Please sign in to comment.