(subject: &str, index: usize, hint: &ProgramVerificationHint)
| 89 | } |
| 90 | |
| 91 | pub fn from_program_hint(subject: &str, index: usize, hint: &ProgramVerificationHint) -> Self { |
| 92 | let id = format!("program:{subject}:{}:{index}", hint.kind); |
| 93 | let check = if hint.required { |
| 94 | Self::required(id, hint.kind.clone(), hint.message.clone()) |
| 95 | } else { |
| 96 | Self::optional(id, hint.kind.clone(), hint.message.clone()) |
| 97 | }; |
| 98 | |
| 99 | check |
| 100 | .with_suggested_tools(hint.suggested_tools.clone()) |
| 101 | .with_evidence_uris(hint.evidence_uris.clone()) |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] |
nothing calls this directly
no test coverage detected