@@ -133,39 +133,39 @@ fn mount3res_roundtrip() {
133133 fhandle : fhandle3 ( Opaque ( Cow :: Borrowed ( & [ 0x12 , 0x34 , 0x56 , 0x78 ] ) ) ) ,
134134 auth_flavors : vec ! [ 1 , 2 , 3 ] ,
135135 } ) ;
136-
136+
137137 let mut buffer = Vec :: new ( ) ;
138138 let pack_len = success_res. pack ( & mut buffer) . unwrap ( ) ;
139139 assert_eq ! ( pack_len, success_res. packed_size( ) ) ;
140-
140+
141141 let mut cursor = Cursor :: new ( buffer) ;
142142 let ( deserialized, unpack_len) = mountres3:: unpack ( & mut cursor) . unwrap ( ) ;
143143 assert_eq ! ( pack_len, unpack_len) ;
144-
144+
145145 match ( & success_res, & deserialized) {
146146 ( mountres3:: Ok ( ok1) , mountres3:: Ok ( ok2) ) => {
147147 assert_eq ! ( ok1. fhandle. 0 . as_ref( ) , ok2. fhandle. 0 . as_ref( ) ) ;
148148 assert_eq ! ( ok1. auth_flavors, ok2. auth_flavors) ;
149149 }
150150 _ => panic ! ( "Expected success response" ) ,
151151 }
152-
152+
153153 // Test error mount response
154154 let error_res = mountres3:: Err ( mountstat3:: MNT3ERR_PERM ) ;
155155 let mut buffer = Vec :: new ( ) ;
156156 let pack_len = error_res. pack ( & mut buffer) . unwrap ( ) ;
157157 assert_eq ! ( pack_len, error_res. packed_size( ) ) ;
158-
158+
159159 let mut cursor = Cursor :: new ( buffer) ;
160160 let ( deserialized, unpack_len) = mountres3:: unpack ( & mut cursor) . unwrap ( ) ;
161161 assert_eq ! ( pack_len, unpack_len) ;
162162 match ( & error_res, & deserialized) {
163- ( mountres3:: Err ( err1) , mountres3:: Err ( err2) ) => {
164- // Compare error codes by their discriminant values
165- assert_eq ! ( * err1 as u32 , * err2 as u32 ) ;
166- }
167- _ => panic ! ( "Expected error response" ) ,
163+ ( mountres3:: Err ( err1) , mountres3:: Err ( err2) ) => {
164+ // Compare error codes by their discriminant values
165+ assert_eq ! ( * err1 as u32 , * err2 as u32 ) ;
168166 }
167+ _ => panic ! ( "Expected error response" ) ,
168+ }
169169}
170170
171171#[ test]
@@ -176,7 +176,7 @@ fn fhandle3_edge_cases() {
176176 let len = empty_fh. pack ( & mut buffer) . unwrap ( ) ;
177177 assert_eq ! ( len, 4 ) ; // Just the length field
178178 assert_eq ! ( buffer, [ 0 , 0 , 0 , 0 ] ) ;
179-
179+
180180 // Test maximum size file handle (64 bytes)
181181 let max_data = vec ! [ 0x42 ; 64 ] ;
182182 let max_fh = fhandle3 ( Opaque ( Cow :: Borrowed ( & max_data) ) ) ;
@@ -192,7 +192,7 @@ fn opaque_auth_default() {
192192 let len = auth. pack ( & mut buffer) . unwrap ( ) ;
193193 assert_eq ! ( len, 8 ) ; // 4 bytes flavor + 4 bytes length (no data)
194194 assert_eq ! ( buffer, [ 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ] ) ;
195-
195+
196196 let mut cursor = Cursor :: new ( buffer) ;
197197 let ( deserialized, unpack_len) = opaque_auth:: unpack ( & mut cursor) . unwrap ( ) ;
198198 assert_eq ! ( len, unpack_len) ;
@@ -206,12 +206,12 @@ fn opaque_auth_with_data() {
206206 flavor : auth_flavor:: AUTH_UNIX ,
207207 body : Opaque ( Cow :: Borrowed ( & [ 0x12 , 0x34 , 0x56 , 0x78 ] ) ) ,
208208 } ;
209-
209+
210210 let mut buffer = Vec :: new ( ) ;
211211 let len = auth. pack ( & mut buffer) . unwrap ( ) ;
212212 assert_eq ! ( len, 12 ) ; // 4 bytes flavor + 4 bytes length + 4 bytes data
213213 assert_eq ! ( buffer, [ 0 , 0 , 0 , 1 , 0 , 0 , 0 , 4 , 0x12 , 0x34 , 0x56 , 0x78 ] ) ;
214-
214+
215215 let mut cursor = Cursor :: new ( buffer) ;
216216 let ( deserialized, unpack_len) = opaque_auth:: unpack ( & mut cursor) . unwrap ( ) ;
217217 assert_eq ! ( len, unpack_len) ;
@@ -232,23 +232,23 @@ fn mount_error_codes() {
232232 mountstat3:: MNT3ERR_NOTSUPP ,
233233 mountstat3:: MNT3ERR_SERVERFAULT ,
234234 ] ;
235-
235+
236236 for error_code in error_codes {
237237 let res = mountres3:: Err ( error_code) ;
238238 let mut buffer = Vec :: new ( ) ;
239239 let len = res. pack ( & mut buffer) . unwrap ( ) ;
240240 assert_eq ! ( len, 4 ) ;
241-
241+
242242 let mut cursor = Cursor :: new ( buffer) ;
243243 let ( deserialized, _) = mountres3:: unpack ( & mut cursor) . unwrap ( ) ;
244244 match deserialized {
245245 mountres3:: Err ( deserialized_code) => {
246246 assert_eq ! ( error_code as u32 , deserialized_code as u32 ) ;
247- } ,
247+ }
248248 mountres3:: Ok ( _) => panic ! ( "Expected error result for error code {error_code:?}" ) ,
249249 }
250250 }
251-
251+
252252 // Test MNT3_OK separately as a success case would require a valid mount response
253253 // which is more complex, so we'll skip it in this simple error code test
254254}
@@ -257,7 +257,7 @@ fn mount_error_codes() {
257257fn rpc_program_constants ( ) {
258258 // Test that common RPC program numbers are correctly defined
259259 assert_eq ! ( RPC_VERSION_2 , 2 ) ;
260-
260+
261261 // Test typical NFS program numbers (these might be defined elsewhere)
262262 let call = call_body {
263263 rpcvers : RPC_VERSION_2 ,
@@ -267,7 +267,7 @@ fn rpc_program_constants() {
267267 cred : opaque_auth:: default ( ) ,
268268 verf : opaque_auth:: default ( ) ,
269269 } ;
270-
270+
271271 assert_eq ! ( call. prog, 100_003 ) ;
272272 assert_eq ! ( call. vers, 3 ) ;
273273 assert_eq ! ( call. rpcvers, RPC_VERSION_2 ) ;
@@ -282,17 +282,17 @@ fn auth_flavors() {
282282 auth_flavor:: AUTH_SHORT ,
283283 auth_flavor:: AUTH_DES ,
284284 ] ;
285-
285+
286286 for flavor in auth_flavors {
287287 let auth = opaque_auth {
288288 flavor,
289289 body : Opaque ( Cow :: Borrowed ( & [ ] ) ) ,
290290 } ;
291-
291+
292292 let mut buffer = Vec :: new ( ) ;
293293 let len = auth. pack ( & mut buffer) . unwrap ( ) ;
294294 assert_eq ! ( len, 8 ) ; // 4 bytes flavor + 4 bytes length
295-
295+
296296 let mut cursor = Cursor :: new ( buffer) ;
297297 let ( deserialized, _) = opaque_auth:: unpack ( & mut cursor) . unwrap ( ) ;
298298 assert_eq ! ( auth. flavor, deserialized. flavor) ;
0 commit comments