INNER CODE UNIT · Rust

Some

killercup/cargo-edit · src/dependency.rs:378

                if let Some(features) = self.features.as_ref() {
                    let features: toml_edit::Value = features.iter().cloned().collect();
                    table.insert("features", features);
                }
                if let Some(v) = self.optional {
                    table.insert("optional", v.into());
                }

                toml_edit::value(toml_edit::Value::InlineTable(table))
            }
        };

        table
    }

    /// Modify existing entry to match this dependency
    pub fn update_toml(&self, crate_root: &Path, key: &mut KeyMut<'_>, item: &mut toml_edit::Item) {
        if str_or_1_len_table(item) {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…