pmeunier / carnix

Homepage field

By blabla on April 23, 2019
signed by pmeunier.
9iMHwaKSjneyPFcL53JQERwwrzwU1WMpQUBNccEpX2n4HSpfTr7DZzNGSEcY8z8ft7W2V29MV973cZJhE3ffBSF2
This patch is in the following branches:
master
In file src/krate.rs
40
41
42
    pub description: Option<String>,
    pub homepage: Option<String>,
    pub edition: Option<String>,
1006
1007
1008
1009
1010
            writeln!(w, "{}  description = \"{}\";", indent, descr.replace("\"", "\\\\\\\""))?;
        }
        if let Some(ref home) = meta.homepage {
            writeln!(w, "{}  homepage = {};", indent, home)?;
        }
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
            .and_then(|p| p.get("description").and_then(|s| s.as_str().map(|s| s.to_string())));
        let homepage = v
            .get("package")
            .and_then(|p| p.get("homepage").map(|s| s.to_string()));
        let authors = v
            .get("package")
            .and_then(|x| x.get("authors"))
            .and_then(|x| x.as_array())
            .map(|x| {
                x.iter()
                    .map(|y| y.as_str().unwrap().to_owned())
                    .collect::<Vec<_>>()
            })
            .unwrap_or_else(Vec::new);

        let (default_features, declared_features) = features(v);
        let include = include(v);
        Ok(Meta {
            src: prefetch.prefetch,
            include,
            dependencies,
            declared_dependencies: declared_dependencies(v),
            target_dependencies,
            build_dependencies,
            crate_file: crate_file(v),
            lib_name: lib_name(v),
            proc_macro: is_proc_macro(v),
            plugin: is_plugin(v),
            crate_type: crate_type(v),
            default_features,
            declared_features,
            use_default_features: None,
            features: BTreeSet::new(),
            build: build(v),
            implied_features: implied,
            bins: bins(v),
            authors,
            description,
            homepage,
            edition,