会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
波尔
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
50
51
52
53
54
55
56
57
58
···
119
下一页
2022年1月10日
【Rust】猜数字游戏
摘要: 环境 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)
2021年12月29日
【Rust】原始标识符
摘要: 环境 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】转义字符
摘要: 环境 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】字节数组
摘要: 环境 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】开发依赖
摘要: 环境 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】不安全操作
摘要: 环境 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】集成测试
摘要: 环境 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】文档测试
摘要: 环境 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】单元测试
摘要: 环境 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】外部函数接口
摘要: 环境 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
下一页
公告