INNER CODE UNIT · Rust

set_features

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

    pub fn set_features(mut self, features: Vec<String>) -> Self {
        self.features = Some(features);
        self
    }
    /// Set features as an array of string (does some basic parsing)
    pub fn extend_features(mut self, features: impl IntoIterator<Item = String>) -> Self {
        self.features
            .get_or_insert_with(Default::default)
            .extend(features);
        self
    }

    /// Set the value of default-features for the dependency
    #[allow(dead_code)]
    pub fn set_default_features(mut self, default_features: bool) -> Self {
        self.default_features = Some(default_features);
        self
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…