360360#![ cfg_attr( not( feature = "std" ) , no_std) ]
361361#![ cfg_attr( docsrs, feature( doc_cfg) ) ]
362362
363- ////////////////////////////////////////////////////////////////////////////////
364-
365363extern crate alloc;
366364
367- /// A facade around all the types we need from the `std`, `core`, and `alloc`
368- /// crates. This avoids elaborate import wrangling having to happen in every
369- /// module.
370- mod lib {
371- pub use core:: cell:: { Cell , RefCell } ;
372- pub use core:: clone:: { self , Clone } ;
373- pub use core:: convert:: { self , From , Into } ;
374- pub use core:: default:: { self , Default } ;
375- pub use core:: fmt:: { self , Debug , Display } ;
376- pub use core:: hash:: { self , Hash , Hasher } ;
377- pub use core:: iter:: FusedIterator ;
378- pub use core:: marker:: { self , PhantomData } ;
379- pub use core:: ops:: { Bound , RangeBounds } ;
380- pub use core:: result:: { self , Result } ;
381- pub use core:: { borrow, char, cmp, iter, mem, num, ops, slice, str} ;
382-
383- pub use alloc:: borrow:: { Cow , ToOwned } ;
384- pub use alloc:: boxed:: Box ;
385- pub use alloc:: collections:: { btree_map, BTreeMap } ;
386- pub use alloc:: string:: { String , ToString } ;
387- pub use alloc:: vec:: { self , Vec } ;
388-
389- #[ cfg( feature = "std" ) ]
390- pub use std:: error;
391- }
392-
393- ////////////////////////////////////////////////////////////////////////////////
394-
395365#[ cfg( feature = "std" ) ]
396366#[ doc( inline) ]
397367pub use crate :: de:: from_reader;
@@ -412,8 +382,8 @@ pub use crate::value::{from_value, to_value, Map, Number, Value};
412382macro_rules! tri {
413383 ( $e: expr $( , ) ?) => {
414384 match $e {
415- crate :: lib :: Result :: Ok ( val) => val,
416- crate :: lib :: Result :: Err ( err) => return crate :: lib :: Result :: Err ( err) ,
385+ core :: result :: Result :: Ok ( val) => val,
386+ core :: result :: Result :: Err ( err) => return core :: result :: Result :: Err ( err) ,
417387 }
418388 } ;
419389}
0 commit comments