File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -153,15 +153,12 @@ macro_rules! quantity {
153153
154154 /// Unit enum.
155155 #[ allow( non_camel_case_types) ]
156- // #[non_exhaustive] // Requires rustc 1.40.0
156+ #[ non_exhaustive]
157157 #[ allow( clippy:: manual_non_exhaustive) ]
158158 #[ derive( Debug , Clone , Copy ) ]
159159 pub enum Units {
160160 $( #[ doc=$plural]
161161 $unit( $unit) , ) +
162-
163- #[ doc( hidden) ]
164- __nonexhaustive,
165162 }
166163
167164 impl Units {
@@ -171,8 +168,6 @@ macro_rules! quantity {
171168 pub fn abbreviation( & self ) -> & ' static str {
172169 match self {
173170 $( Units :: $unit( _) => <$unit as __system:: Unit >:: abbreviation( ) , ) +
174-
175- Units :: __nonexhaustive => "unknown" ,
176171 }
177172 }
178173
@@ -182,8 +177,6 @@ macro_rules! quantity {
182177 pub fn singular( & self ) -> & ' static str {
183178 match self {
184179 $( Units :: $unit( _) => <$unit as __system:: Unit >:: singular( ) , ) +
185-
186- Units :: __nonexhaustive => "unknown" ,
187180 }
188181 }
189182
@@ -193,8 +186,6 @@ macro_rules! quantity {
193186 pub fn plural( & self ) -> & ' static str {
194187 match self {
195188 $( Units :: $unit( _) => <$unit as __system:: Unit >:: plural( ) , ) +
196-
197- Units :: __nonexhaustive => "unknown" ,
198189 }
199190 }
200191 }
You can’t perform that action at this time.
0 commit comments