diff --git a/module/rust/is_slice/Readme.md b/module/rust/is_slice/Readme.md index 4d67e06dfb..669c8b67c8 100644 --- a/module/rust/is_slice/Readme.md +++ b/module/rust/is_slice/Readme.md @@ -8,17 +8,12 @@ Macro to answer the question: is it a slice? ```rust use is_slice::*; -fn main() -{ - - dbg!( is_slice!( Box::new( true ) ) ); - // < is_slice!(Box :: new(true)) = false - dbg!( is_slice!( &[ 1, 2, 3 ] ) ); - // < is_slice!(& [1, 2, 3]) = false - dbg!( is_slice!( &[ 1, 2, 3 ][ .. ] ) ); - // < is_slice!(& [1, 2, 3] [..]) = true - -} +dbg!( is_slice!( Box::new( true ) ) ); +// < is_slice!(Box :: new(true)) = false +dbg!( is_slice!( &[ 1, 2, 3 ] ) ); +// < is_slice!(& [1, 2, 3]) = false +dbg!( is_slice!( &[ 1, 2, 3 ][ .. ] ) ); +// < is_slice!(& [1, 2, 3] [..]) = true ``` ### To add to your project diff --git a/sample/rust/implements_trivial_sample/Readme.md b/sample/rust/implements_trivial_sample/Readme.md new file mode 100644 index 0000000000..71881de264 --- /dev/null +++ b/sample/rust/implements_trivial_sample/Readme.md @@ -0,0 +1,5 @@ +# Sample + +[![discord](https://img.shields.io/discord/872391416519737405?color=eee&logo=discord&logoColor=eee&label=ask)](https://discord.gg/m3YfbXpUUY) +[![Open in Gitpod](https://raster.shields.io/static/v1?label=try&message=online&color=eee&logo=gitpod&logoColor=eee)](https://gitpod.io/#RUN_PATH=sample%2Frust%2Fimplements_trivial_sample,SAMPLE_FILE=.%2Fsrc%2Fmain.rs/https://github.com/Wandalen/wTools) +[![docs.rs](https://raster.shields.io/static/v1?label=docs&message=online&color=eee&logo=docsdotrs&logoColor=eee)](https://docs.rs/implements) diff --git a/sample/rust/implements_trivial_sample/src/main.rs b/sample/rust/implements_trivial_sample/src/main.rs index 346ddddd2c..f244edc443 100644 --- a/sample/rust/implements_trivial_sample/src/main.rs +++ b/sample/rust/implements_trivial_sample/src/main.rs @@ -2,10 +2,8 @@ pub use implements::*; fn main() { - dbg!( implements!( 13_i32 => Copy ) ); // < implements!( 13_i32 => Copy ) : true dbg!( implements!( Box::new( 13_i32 ) => Copy ) ); // < implements!( 13_i32 => Copy ) : false - }