摘要:#[cfg(debug_assertions)] macro_rules! debug { () => (std::println!()); ($($arg:tt)*) => ({ println!($($arg)*); }) } #[cfg(not(debug_assertions))] macr
阅读全文
posted @ 2021-02-10 15:19
|
|
|
随笔分类 - RUST
摘要:#[cfg(debug_assertions)] macro_rules! debug { () => (std::println!()); ($($arg:tt)*) => ({ println!($($arg)*); }) } #[cfg(not(debug_assertions))] macr
阅读全文
posted @ 2021-02-10 15:19
摘要:https://dev.to/cad97/rust-must-know-crates-5ad8 https://dev.to/search?q=100DayOfRust https://fasterthanli.me/tags/rust
阅读全文
posted @ 2021-02-10 10:01
摘要:https://lborb.github.io/book/title-page.html https://blog.logrocket.com/unsafe-rust-how-and-when-not-to-use-it/
阅读全文
posted @ 2021-01-28 08:42
摘要:https://crates.io/crates/typed-builder typed-builder = "0.5.1" Rust Typed Builder Creates a compile-time verified builder: #[macro_use] extern crate t
阅读全文
posted @ 2020-03-12 13:32
摘要:#[allow(unused_macros)] macro_rules! unless { ($arg:expr,$branch:expr) => { if !$arg {$branch}; }; } fn main() { println!("Hello, world!"); unless!(2>
阅读全文
posted @ 2019-07-15 16:35
|
|