mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-07-30 19:51:58 -07:00
benches
benchsuite
ci
doc
grep
pkg
src
tests
hay.rs
tests.rs
workdir.rs
.gitignore
.travis.yml
COPYING
Cargo.lock
Cargo.toml
LICENSE-MIT
README.md
UNLICENSE
appveyor.yml
compile
25 lines
755 B
Rust
25 lines
755 B
Rust
pub const SHERLOCK: &'static str = "\
|
|
For the Doctor Watsons of this world, as opposed to the Sherlock
|
|
Holmeses, success in the province of detective work must always
|
|
be, to a very large extent, the result of luck. Sherlock Holmes
|
|
can extract a clew from a wisp of straw or a flake of cigar ash;
|
|
but Doctor Watson has to have it taken out for him and dusted,
|
|
and exhibited clearly, with a label attached.
|
|
";
|
|
|
|
pub const CODE: &'static str = "\
|
|
extern crate snap;
|
|
|
|
use std::io;
|
|
|
|
fn main() {
|
|
let stdin = io::stdin();
|
|
let stdout = io::stdout();
|
|
|
|
// Wrap the stdin reader in a Snappy reader.
|
|
let mut rdr = snap::Reader::new(stdin.lock());
|
|
let mut wtr = stdout.lock();
|
|
io::copy(&mut rdr, &mut wtr).expect(\"I/O operation failed\");
|
|
}
|
|
";
|