File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed
Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,8 @@ fn main() {
7878fn parse_openapi_specs ( spec : & Vec < PathBuf > ) -> Vec < OpenAPI > {
7979 spec. into_iter ( )
8080 . map ( |spec| {
81- let file = File :: open ( & spec) . unwrap ( ) ;
81+ let file =
82+ File :: open ( & spec) . expect ( format ! ( "Could not open file: {:?}" , spec) . as_str ( ) ) ;
8283 let reader = BufReader :: new ( file) ;
8384 let openapi: OpenAPI = serde_yaml:: from_reader ( reader)
8485 . expect ( format ! ( "Could not deserialize input: {:?}" , spec) . as_str ( ) ) ;
Original file line number Diff line number Diff line change @@ -228,15 +228,17 @@ fn merge_unique<Key, Item>(
228228) -> Result < IndexMap < Key , Item > >
229229where
230230 Key : std:: fmt:: Debug + Eq + std:: hash:: Hash ,
231- Item : PartialEq ,
231+ Item : std :: fmt :: Debug + PartialEq ,
232232{
233233 for ( key, value) in b {
234234 match a. entry ( key) {
235235 indexmap:: map:: Entry :: Occupied ( entry) => {
236236 if entry. get ( ) != & value {
237237 return Err ( Error :: unexpected ( format ! (
238- "Duplicate key {:?} with different values" ,
239- entry. key( )
238+ "Duplicate key {:?} with different values \n Current {:?} \n New {:?}" ,
239+ entry. key( ) ,
240+ entry. get( ) ,
241+ value
240242 ) ) ) ;
241243 }
242244 }
You can’t perform that action at this time.
0 commit comments