上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 119 下一页
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/book/ch02-00-guessing-game-tutorial.html 示例 main.rs use std::{cmp::Ordering, io::s 阅读全文
posted @ 2022-01-10 19:35 jiangbo4444 阅读(77) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/compatibility/raw_identifiers.html 示例 原始标识符可以避免由于新增加关键字导致的不兼容问题,使用 阅读全文
posted @ 2021-12-29 15:15 jiangbo4444 阅读(133) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/rust-by-example/std/str.html 示例 转义 fn main() { let byte_escape = "I'm writing \x52\x75\x7 阅读全文
posted @ 2021-12-29 15:14 jiangbo4444 阅读(2161) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/rust-by-example/std/str.html 示例 在字符串前加上一个 b 来表示。 main.rs use std::str; fn main() { let by 阅读全文
posted @ 2021-12-29 15:13 jiangbo4444 阅读(1084) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/testing/dev_dependencies.html 示例 main.rs #[cfg(test)] #[macro_use] 阅读全文
posted @ 2021-12-29 15:12 jiangbo4444 阅读(133) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/unsafe.html 示例 原始指针 fn main() { let raw_p: *const u32 = &10; unsaf 阅读全文
posted @ 2021-12-29 15:12 jiangbo4444 阅读(65) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/testing/integration_testing.html 示例 Cargo.toml [package] name = "a 阅读全文
posted @ 2021-12-29 15:11 jiangbo4444 阅读(140) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/testing/doc_testing.html 示例 main.rs /// /// ``` /// # fn foo() {} 阅读全文
posted @ 2021-12-29 11:06 jiangbo4444 阅读(114) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 概念 参考:https://doc.rust-lang.org/stable/rust-by-example/testing/unit_testing.html 示例 测试相等 pub fn add(a: i32, b: i32) -> i3 阅读全文
posted @ 2021-12-29 11:05 jiangbo4444 阅读(290) 评论(0) 推荐(0)
摘要: 环境 Rust 1.56.1 VSCode 1.61.2 Windows 7 mingw64 7.3.0 概念 参考:https://stackoverflow.com/questions/40833078/how-do-i-specify-the-linker-path-in-rust 示例 Ca 阅读全文
posted @ 2021-12-29 11:04 jiangbo4444 阅读(214) 评论(0) 推荐(0)
上一页 1 ··· 50 51 52 53 54 55 56 57 58 ··· 119 下一页