pub fn replace_hints_for_input(&mut self, index: usize, hints_bag: HintsBag) {
        let public: Vec<Hint> = hints_bag
            .hints
            .clone()
            .into_iter()
            .filter(|hint| matches!(hint, Hint::CommitmentHint(_)))
            .collect();
        let secret: Vec<Hint> = hints_bag
            .hints
            .into_iter()
            .filter(|hint| matches!(hint, Hint::SecretProven(_)))
            .collect();

        self.secret_hints.insert(index, HintsBag { hints: secret });
        self.public_hints.insert(index, HintsBag { hints: public });
    }
/// Replacing Hints for an input index
Replacing Hints for an input index
Replacing Hints for an input index
pub fn replace_hints_for_input(&mut self, index: usize, hints_bag: HintsBag) {
        let public: Vec<Hint> = hints_bag
            .hints
            .clone()
            .into_iter()
            .filter(|hint| matches!(hint, Hint::CommitmentHint(_)))
            .collect();
        let secret: Vec<Hint> = hints_bag
            .hints
            .into_iter()
            .filter(|hint| matches!(hint, Hint::SecretProven(_)))
            .collect();
        self.secret_hints.insert(index, HintsBag { hints: secret });
        self.public_hints.insert(index, HintsBag { hints: public });
    }
pub fn replace_hints_for_input ( & mut self , index : usize , hints_bag : HintsBag ) { let public : Vec < Hint > = hints_bag . hints . clone ( ) . into_iter ( ) . filter ( | hint | matches ! ( hint Hint CommitmentHint ( ) ) ) . collect ( ) ; let secret : Vec < Hint > = hints_bag . hints . into_iter ( ) . filter ( | hint | matches ! ( hint Hint SecretProven ( ) ) ) . collect ( ) ; self . secret_hints . insert ( index , HintsBag { hints : secret } ) ; self . public_hints . insert ( index , HintsBag { hints : public } ) ; }
Replacing Hints for an input index
Replacing Hints for an input index
&mut self
index
usize
hints_bag
HintsBag
&mut self
index
usize
hints_bag
HintsBag