INNER CODE UNIT · Rust

set_optional

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

    pub fn set_optional(mut self, opt: bool) -> Self {
        self.optional = Some(opt);
        self
    }

    /// Set features as an array of string (does some basic parsing)
    #[allow(dead_code)]
    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
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…