cargo-udeps [cargo-udeps] - find unused dependencies cargo-update - cargo subcommand for checking and applying updates to installed executables cargo-watch - utility for cargo to compile projects when sources change dtolnay/cargo-expand - Expand macros in your source code CMake Devolutions/CMake...
cargo-udeps [cargo-udeps]— find unused dependencies cargo-update— cargo subcommand for checking and applying updates to installed executables cargo-watch— utility for cargo to compile projects when sources change dtolnay/cargo-expand— Expand macros in your source code CMake Devolutions/CMakeRu...
cargo-udeps [cargo-udeps] - find unused dependencies cargo-update - cargo subcommand for checking and applying updates to installed executables cargo-watch - utility for cargo to compile projects when sources change dtolnay/cargo-expand - Expand macros in your source code CMake Devolutions/CMake...
我们可以在之前使用find_matches地方做一个改造,并且功能也不会受影响。 fn main() -> Result<()> {// ...f789::find_matches(&content, &args.pattern, &mut std::io::stdout());//...}#[test]fn find_a_match() {//...f789::find_matches("front\n789", "789", &mut result);// ....
name: Check unused Rust dependencies runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v3 - name: Install Devbox uses: jetpack-io/devbox-install-action@v0.7.0 with: enable-cache: "true" - name: Check formatting run: devbox run -- just check-unused-depend...
[dependencies] 1. 2. 3. 4. 5. 6. 7. 8. 9. 其中[package]是一个表块(section)标题,表明下面的语句用来配置一个包(package)。随着我们在这个文件增加更多的信息,还将增加其他表块。 表块英文直译为节或者部分,笔者将起理解为这个语境下的表块理解为配置文件中的一小段,一小节,读者们也可以试着理解。
#[allow(unused_must_use)] for line in content.lines() { if line.contains(pattern) { writeln!(writer, "{}", line); } } } #[test] fn find_a_match() { let mut result = Vec::new(); find_matches("front\n789", "789", &mut result); ...
find_matches(&content, &args.pattern, &mut std::io::stdout()); Ok(()) } fn find_matches(content: &str, pattern: &str, mut writer: impl std::io::Write) { #[allow(unused_must_use)] for line in content.lines() { if line.contains(pattern) { ...
在上一篇Rust 开发命令行工具(上)中我们从项目配置/参数获取/解析文件内容/处理错误信息/信息输出处理等方面。一步一步写出来可以构建出在本地,兼容错误提示,并且有很好的输出形式的本地搜索工具。 以防大家遗忘,我们把最终的代码贴到下面。 代码语言:javascript ...
[allow(proc_macro_derive_resolution_fallback, unused_attributes)]#[macro_use]extern crate diesel;extern crate dotenv;extern crate r2d2;extern crate r2d2_diesel;#[macro_use]extern crate rocket;extern crate rocket_contrib;#[macro_use]extern crate serde_derive;#[macro_use]extern crate serde_json...