@@ -259,22 +259,6 @@ impl Scope {
259259 }
260260}
261261
262- /*
263- impl Validate for Scope {
264- fn validate(&self, version: SpecVersion) -> ValidationResult {
265- match self {
266- Scope::UnknownScope(_) => ValidationResult::Failed {
267- reasons: vec![FailureReason {
268- message: "Unknown scope".to_string(),
269- context,
270- }],
271- },
272- _ => ValidationResult::Passed,
273- }
274- }
275- }
276- */
277-
278262/// Checks if given [`MimeType`] is valid / supported.
279263pub fn validate_mime_type ( mime_type : & MimeType ) -> Result < ( ) , ValidationError > {
280264 static UUID_REGEX : Lazy < Regex > =
@@ -341,26 +325,8 @@ impl Validate for ComponentEvidence {
341325 fn validate ( & self , version : SpecVersion ) -> ValidationResult {
342326 ValidationContext :: new ( )
343327 . add_struct_option ( "licenses" , self . licenses . as_ref ( ) , version)
328+ . add_struct_option ( "copyright" , self . copyright . as_ref ( ) , version)
344329 . into ( )
345- /*
346- let mut results: Vec<ValidationResult> = vec![];
347-
348- if let Some(licenses) = &self.licenses {
349- let context = context.with_struct("ComponentEvidence", "licenses");
350-
351- results.push(licenses.validate_with_context(context));
352- }
353-
354- if let Some(copyright) = &self.copyright {
355- let context = context.with_struct("ComponentEvidence", "copyright");
356-
357- results.push(copyright.validate_with_context(context));
358- }
359-
360- results
361- .into_iter()
362- .fold(ValidationResult::default(), |acc, result| acc.merge(result))
363- */
364330 }
365331}
366332
0 commit comments