@@ -38,7 +38,7 @@ pub struct Commit {
3838}
3939
4040impl Validate for Commit {
41- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
41+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
4242 ValidationContext :: new ( )
4343 . add_field_option ( "uid" , self . uid . as_ref ( ) , validate_normalized_string)
4444 . add_field_option ( "url" , self . url . as_ref ( ) , validate_uri)
@@ -53,9 +53,9 @@ impl Validate for Commit {
5353pub struct Commits ( pub Vec < Commit > ) ;
5454
5555impl Validate for Commits {
56- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
56+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
5757 ValidationContext :: new ( )
58- . add_list ( "inner" , & self . 0 , |commit| commit. validate ( version) )
58+ . add_list ( "inner" , & self . 0 , |commit| commit. validate_version ( version) )
5959 . into ( )
6060 }
6161}
@@ -67,7 +67,7 @@ pub struct Diff {
6767}
6868
6969impl Validate for Diff {
70- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
70+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
7171 ValidationContext :: new ( )
7272 . add_struct_option ( "text" , self . text . as_ref ( ) , version)
7373 . add_field_option ( "url" , self . url . as_ref ( ) , validate_uri)
@@ -83,7 +83,7 @@ pub struct IdentifiableAction {
8383}
8484
8585impl Validate for IdentifiableAction {
86- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
86+ fn validate_version ( & self , _version : SpecVersion ) -> ValidationResult {
8787 ValidationContext :: new ( )
8888 . add_field_option ( "timestamp" , self . timestamp . as_ref ( ) , validate_date_time)
8989 . add_field_option ( "name" , self . name . as_ref ( ) , validate_normalized_string)
@@ -103,7 +103,7 @@ pub struct Issue {
103103}
104104
105105impl Validate for Issue {
106- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
106+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
107107 ValidationContext :: new ( )
108108 . add_field (
109109 "issue_type" ,
@@ -175,7 +175,7 @@ pub struct Patch {
175175}
176176
177177impl Validate for Patch {
178- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
178+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
179179 ValidationContext :: new ( )
180180 . add_enum (
181181 "patch_type" ,
@@ -184,7 +184,7 @@ impl Validate for Patch {
184184 )
185185 . add_struct_option ( "diff" , self . diff . as_ref ( ) , version)
186186 . add_list_option ( "resolves" , self . resolves . as_ref ( ) , |issue| {
187- issue. validate ( version)
187+ issue. validate_version ( version)
188188 } )
189189 . into ( )
190190 }
@@ -194,9 +194,9 @@ impl Validate for Patch {
194194pub struct Patches ( pub Vec < Patch > ) ;
195195
196196impl Validate for Patches {
197- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
197+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
198198 ValidationContext :: new ( )
199- . add_list ( "inner" , & self . 0 , |patch| patch. validate ( version) )
199+ . add_list ( "inner" , & self . 0 , |patch| patch. validate_version ( version) )
200200 . into ( )
201201 }
202202}
@@ -255,7 +255,7 @@ pub struct Source {
255255}
256256
257257impl Validate for Source {
258- fn validate ( & self , version : SpecVersion ) -> ValidationResult {
258+ fn validate_version ( & self , version : SpecVersion ) -> ValidationResult {
259259 ValidationContext :: new ( )
260260 . add_field_option ( "name" , self . name . as_ref ( ) , validate_normalized_string)
261261 . add_field_option ( "url" , self . url . as_ref ( ) , validate_uri)
@@ -287,7 +287,7 @@ mod test {
287287 } ) ,
288288 message: Some ( NormalizedString ( "no_whitespace" . to_string( ) ) ) ,
289289 } ] )
290- . validate_default ( ) ;
290+ . validate ( ) ;
291291
292292 assert_eq ! ( validation_result, ValidationResult :: Passed ) ;
293293 }
@@ -309,7 +309,7 @@ mod test {
309309 } ) ,
310310 message: Some ( NormalizedString ( "spaces and\t tabs" . to_string( ) ) ) ,
311311 } ] )
312- . validate_default ( ) ;
312+ . validate ( ) ;
313313
314314 assert_eq ! (
315315 validation_result. errors( ) ,
@@ -370,7 +370,7 @@ mod test {
370370 references: Some ( vec![ Uri ( "https://example.com" . to_string( ) ) ] ) ,
371371 } ] ) ,
372372 } ] )
373- . validate_default ( ) ;
373+ . validate ( ) ;
374374
375375 assert_eq ! ( validation_result, ValidationResult :: Passed ) ;
376376 }
@@ -399,7 +399,7 @@ mod test {
399399 references: Some ( vec![ Uri ( "invalid uri" . to_string( ) ) ] ) ,
400400 } ] ) ,
401401 } ] )
402- . validate_default ( ) ;
402+ . validate ( ) ;
403403
404404 assert_eq ! (
405405 validation_result. errors( ) ,
0 commit comments