tim-rust-minigrep 0.1.1

A Minigrep
Documentation
  • Coverage
  • 0%
    0 out of 9 items documented0 out of 5 items with examples
  • Size
  • Source code size: 5.58 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.32 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • TimZhang2090
$ cargo run -- 被搜索关键字 example-filename.txt
$ cargo run -- to poem.txt

携带环境变量

IGNORE_CASE=1 cargo run -- to poem.txt

如果你使用 PowerShell,则需要用两个命令来分别设置环境变量并运行程序:

PS> $Env:IGNORE_CASE=1; cargo run to poem.txt

on Windows:

set RUST_BACKTRACE=1
tauri dev

只有标准输出会输出到 output.txt 文件; 标准错误输出(eprintln!),则不会。

cargo run > output.txt