@@ -34,10 +34,10 @@ fn implements_basic() {
3434  assert ! ( the_module:: implements!(  src => Clone  ) ) ; 
3535
3636  let  src = Box :: new ( true ) ; 
37-   assert_eq ! ( the_module:: implements!(  src => Copy  ) ,   false ) ; 
37+   assert ! ( ! the_module:: implements!(  src => Copy  ) ) ; 
3838  assert ! ( the_module:: implements!(  src => Clone  ) ) ; 
3939
40-   assert_eq ! ( the_module:: implements!(  Box :: new(  true  )  => core:: marker:: Copy  ) ,   false ) ; 
40+   assert ! ( ! the_module:: implements!(  Box :: new(  true  )  => core:: marker:: Copy  ) ) ; 
4141  assert ! ( the_module:: implements!(  Box :: new(  true  )  => core:: clone:: Clone  ) ) ; 
4242} 
4343
@@ -46,42 +46,43 @@ fn implements_basic() {
4646#[  test ]  
4747fn  instance_of_basic ( )  { 
4848  let  src = Box :: new ( true ) ; 
49-   assert_eq ! ( the_module:: instance_of!(  src => Copy  ) ,   false ) ; 
49+   assert ! ( ! the_module:: instance_of!(  src => Copy  ) ) ; 
5050  assert ! ( the_module:: instance_of!(  src => Clone  ) ) ; 
5151} 
5252
5353// 
5454
5555#[  test ]  
5656fn  implements_functions ( )  { 
57-   let  _f  = || { 
57+   let  test_f_simple  = || { 
5858    println ! ( "hello" ) ; 
5959  } ; 
60+   let  _ = test_f_simple;  // Explicitly ignore to prevent unused warning 
6061
6162  let  fn_context = std:: vec![ 1 ,  2 ,  3 ] ; 
62-   let  _fn  = || { 
63+   let  test_fn  = || { 
6364    println ! ( "hello {fn_context:?}" ) ; 
6465  } ; 
6566
6667  let  mut  fn_mut_context = std:: vec![ 1 ,  2 ,  3 ] ; 
67-   let  _fn_mut  = || { 
68+   let  test_fn_mut  = || { 
6869    fn_mut_context[ 0 ]  = 3 ; 
6970    println ! ( "{fn_mut_context:?}" ) ; 
7071  } ; 
7172
7273  let  mut  fn_once_context = std:: vec![ 1 ,  2 ,  3 ] ; 
73-   let  _fn_once  = || { 
74+   let  test_fn_once  = || { 
7475    fn_once_context[ 0 ]  = 3 ; 
7576    let  x = fn_once_context; 
7677    println ! ( "{x:?}" ) ; 
7778  } ; 
7879
7980  /* */ 
8081
81-   assert ! ( the_module:: implements!(  _fn  => Copy  ) ) ; 
82-   assert ! ( the_module:: implements!(  _fn  => Clone  ) ) ; 
83-   assert_eq ! ( the_module:: implements!(  _fn  => core:: ops:: Not  ) ,   false ) ; 
84-   let  _ = _fn ; 
82+   assert ! ( the_module:: implements!(  test_fn  => Copy  ) ) ; 
83+   assert ! ( the_module:: implements!(  test_fn  => Clone  ) ) ; 
84+   assert ! ( ! the_module:: implements!(  test_fn  => core:: ops:: Not  ) ) ; 
85+   let  _ = test_fn ; 
8586
8687  /* */ 
8788
@@ -90,20 +91,20 @@ fn implements_functions() {
9091  // assert_eq!( the_module::implements!( &function1 => FnMut() -> () ), true ); 
9192  // assert_eq!( the_module::implements!( &function1 => FnOnce() -> () ), true ); 
9293
93-   // assert_eq!( the_module::implements!( _fn  => fn() -> () ), true ); 
94-   assert ! ( the_module:: implements!(  _fn  => Fn ( )  ) ) ; 
95-   assert ! ( the_module:: implements!(  _fn  => FnMut ( )  ) ) ; 
96-   assert ! ( the_module:: implements!(  _fn  => FnOnce ( )  ) ) ; 
94+   // assert_eq!( the_module::implements!( test_fn  => fn() -> () ), true ); 
95+   assert ! ( the_module:: implements!(  test_fn  => Fn ( )  ) ) ; 
96+   assert ! ( the_module:: implements!(  test_fn  => FnMut ( )  ) ) ; 
97+   assert ! ( the_module:: implements!(  test_fn  => FnOnce ( )  ) ) ; 
9798
98-   // assert_eq!( the_module::implements!( _fn_mut  => fn() -> () ), false ); 
99-   // assert_eq!( the_module::implements!( _fn_mut  => Fn() -> () ), false ); 
100-   assert ! ( the_module:: implements!(  _fn_mut  => FnMut ( )  ) ) ; 
101-   assert ! ( the_module:: implements!(  _fn_mut  => FnOnce ( )  ) ) ; 
99+   // assert_eq!( the_module::implements!( test_fn_mut  => fn() -> () ), false ); 
100+   // assert_eq!( the_module::implements!( test_fn_mut  => Fn() -> () ), false ); 
101+   assert ! ( the_module:: implements!(  test_fn_mut  => FnMut ( )  ) ) ; 
102+   assert ! ( the_module:: implements!(  test_fn_mut  => FnOnce ( )  ) ) ; 
102103
103-   // assert_eq!( the_module::implements!( _fn_once  => fn() -> () ), false ); 
104-   // assert_eq!( the_module::implements!( _fn_once  => Fn() -> () ), false ); 
105-   // assert_eq!( the_module::implements!( _fn_once  => FnMut() -> () ), false ); 
106-   assert ! ( the_module:: implements!(  _fn_once  => FnOnce ( )  ) ) ; 
104+   // assert_eq!( the_module::implements!( test_fn_once  => fn() -> () ), false ); 
105+   // assert_eq!( the_module::implements!( test_fn_once  => Fn() -> () ), false ); 
106+   // assert_eq!( the_module::implements!( test_fn_once  => FnMut() -> () ), false ); 
107+   assert ! ( the_module:: implements!(  test_fn_once  => FnOnce ( )  ) ) ; 
107108
108109  // fn is_f < R >                             ( _x : fn() -> R )      -> bool { true } 
109110  // fn is_fn < R, F : Fn() -> R >             ( _x : &F )             -> bool { true } 
@@ -133,23 +134,23 @@ fn fn_experiment() {
133134    true 
134135  } 
135136
136-   let  _f  = || { 
137+   let  test_closure  = || { 
137138    println ! ( "hello" ) ; 
138139  } ; 
139140
140141  let  fn_context = std:: vec![ 1 ,  2 ,  3 ] ; 
141-   let  _fn  = || { 
142+   let  test_fn_capture  = || { 
142143    println ! ( "hello {fn_context:?}" ) ; 
143144  } ; 
144145
145146  let  mut  fn_mut_context = std:: vec![ 1 ,  2 ,  3 ] ; 
146-   let  _fn_mut  = || { 
147+   let  test_fn_mut2  = || { 
147148    fn_mut_context[ 0 ]  = 3 ; 
148149    println ! ( "{fn_mut_context:?}" ) ; 
149150  } ; 
150151
151152  let  mut  fn_once_context = std:: vec![ 1 ,  2 ,  3 ] ; 
152-   let  _fn_once  = || { 
153+   let  test_fn_once2  = || { 
153154    fn_once_context[ 0 ]  = 3 ; 
154155    let  x = fn_once_context; 
155156    println ! ( "{x:?}" ) ; 
@@ -160,25 +161,25 @@ fn fn_experiment() {
160161  assert ! ( is_fn_mut( & function1) ) ; 
161162  assert ! ( is_fn_once( & function1) ) ; 
162163
163-   assert ! ( is_f( _f ) ) ; 
164-   assert ! ( is_fn( & _f ) ) ; 
165-   assert ! ( is_fn_mut( & _f ) ) ; 
166-   assert ! ( is_fn_once( & _f ) ) ; 
167- 
168-   // assert_eq!( is_f( _fn  ), true ); 
169-   assert ! ( is_fn( & _fn ) ) ; 
170-   assert ! ( is_fn_mut( & _fn ) ) ; 
171-   assert ! ( is_fn_once( & _fn ) ) ; 
172- 
173-   // assert_eq!( is_f( _fn_mut  ), true ); 
174-   // assert_eq!( is_fn( &_fn_mut  ), true ); 
175-   assert ! ( is_fn_mut( & _fn_mut ) ) ; 
176-   assert ! ( is_fn_once( & _fn_mut ) ) ; 
177- 
178-   // assert_eq!( is_f( _fn_once  ), true ); 
179-   // assert_eq!( is_fn( &_fn_once  ), true ); 
180-   // assert_eq!( is_fn_mut( &_fn_once  ), true ); 
181-   assert ! ( is_fn_once( & _fn_once ) ) ; 
164+   assert ! ( is_f( test_closure ) ) ; 
165+   assert ! ( is_fn( & test_closure ) ) ; 
166+   assert ! ( is_fn_mut( & test_closure ) ) ; 
167+   assert ! ( is_fn_once( & test_closure ) ) ; 
168+ 
169+   // assert_eq!( is_f( test_fn_capture  ), true ); 
170+   assert ! ( is_fn( & test_fn_capture ) ) ; 
171+   assert ! ( is_fn_mut( & test_fn_capture ) ) ; 
172+   assert ! ( is_fn_once( & test_fn_capture ) ) ; 
173+ 
174+   // assert_eq!( is_f( test_fn_mut2  ), true ); 
175+   // assert_eq!( is_fn( &test_fn_mut2  ), true ); 
176+   assert ! ( is_fn_mut( & test_fn_mut2 ) ) ; 
177+   assert ! ( is_fn_once( & test_fn_mut2 ) ) ; 
178+ 
179+   // assert_eq!( is_f( test_fn_once2  ), true ); 
180+   // assert_eq!( is_fn( &test_fn_once2  ), true ); 
181+   // assert_eq!( is_fn_mut( &test_fn_once2  ), true ); 
182+   assert ! ( is_fn_once( & test_fn_once2 ) ) ; 
182183
183184  // type Routine< R > = fn() -> R; 
184185  fn  is_f < R > ( _x :  fn ( )  -> R )  -> bool  { 
0 commit comments