@@ -43,28 +43,28 @@ impl fmt::Display for SpecVersion {
43
43
}
44
44
}
45
45
46
- /// Error representing an invalid [`SpecVersion`] string identifier
46
+ /// Error representing an unknown [`SpecVersion`] string identifier
47
47
#[ derive( Debug ) ]
48
- pub struct InvalidSpecVersion {
48
+ pub struct UnknownSpecVersion {
49
49
spec_version_value : String ,
50
50
}
51
51
52
- impl fmt:: Display for InvalidSpecVersion {
52
+ impl fmt:: Display for UnknownSpecVersion {
53
53
fn fmt ( & self , f : & mut Formatter < ' _ > ) -> fmt:: Result {
54
54
write ! ( f, "Invalid specversion {}" , self . spec_version_value)
55
55
}
56
56
}
57
57
58
- impl std:: error:: Error for InvalidSpecVersion { }
58
+ impl std:: error:: Error for UnknownSpecVersion { }
59
59
60
60
impl TryFrom < & str > for SpecVersion {
61
- type Error = InvalidSpecVersion ;
61
+ type Error = UnknownSpecVersion ;
62
62
63
- fn try_from ( value : & str ) -> Result < Self , InvalidSpecVersion > {
63
+ fn try_from ( value : & str ) -> Result < Self , UnknownSpecVersion > {
64
64
match value {
65
65
"0.3" => Ok ( SpecVersion :: V03 ) ,
66
66
"1.0" => Ok ( SpecVersion :: V10 ) ,
67
- _ => Err ( InvalidSpecVersion {
67
+ _ => Err ( UnknownSpecVersion {
68
68
spec_version_value : value. to_string ( ) ,
69
69
} ) ,
70
70
}
0 commit comments