• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 use rayon_core::ThreadPoolBuilder;
2 use std::error::Error;
3 
4 #[test]
double_init_fail()5 fn double_init_fail() {
6     let result1 = ThreadPoolBuilder::new().build_global();
7     assert_eq!(result1.unwrap(), ());
8     let err = ThreadPoolBuilder::new().build_global().unwrap_err();
9     assert!(err.source().is_none());
10     assert_eq!(
11         err.to_string(),
12         "The global thread pool has already been initialized.",
13     );
14 }
15