File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -417,6 +417,10 @@ where
417
417
return decode_str_from_value ( val) ;
418
418
}
419
419
420
+ if let Some ( val) = dict. get ( "navName" ) {
421
+ return decode_str_from_value ( val) ;
422
+ }
423
+
420
424
if let Some ( val) = dict. get ( "id" ) {
421
425
return if let Value :: Ref ( val) = val {
422
426
Cow :: Borrowed ( val. dis . as_ref ( ) . unwrap_or ( & val. value ) )
@@ -497,6 +501,12 @@ mod test {
497
501
assert_eq ! ( dict_to_dis( & dict, & |_| None , None ) , "display" ) ;
498
502
}
499
503
504
+ #[ test]
505
+ fn dict_to_dis_returns_nav_name ( ) {
506
+ let dict = dict ! [ "navName" => Value :: make_str( "navName" ) ] ;
507
+ assert_eq ! ( dict_to_dis( & dict, & |_| None , None ) , "navName" ) ;
508
+ }
509
+
500
510
#[ test]
501
511
fn dict_to_dis_returns_id ( ) {
502
512
let dict = dict ! [ "id" => Value :: make_ref( "id" ) ] ;
You can’t perform that action at this time.
0 commit comments