fixes
rodzic
df68efdea8
commit
2c9cc73d6a
|
@ -16,7 +16,7 @@ impl Exclusion {
|
|||
fn walk(
|
||||
dir: &Path,
|
||||
exclusion: &Option<Exclusion>,
|
||||
cb: &Fn(&DirEntry),
|
||||
cb: &dyn Fn(&DirEntry),
|
||||
recurse: bool,
|
||||
) -> io::Result<()> {
|
||||
for entry in dir.read_dir()? {
|
||||
|
@ -86,7 +86,6 @@ fn main() -> io::Result<()> {
|
|||
)
|
||||
.get_matches();
|
||||
|
||||
let filter_conf = matches.value_of("match").unwrap_or("");
|
||||
let recurse = matches.is_present("recursive");
|
||||
let exclusions = matches.value_of("exclude").map(|e| Exclusion(e.into()));
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
# Scan this file for changes every 30 seconds
|
||||
refresh_rate: 30 seconds
|
||||
|
||||
appenders:
|
||||
|
@ -21,4 +20,3 @@ loggers:
|
|||
level: info
|
||||
appenders:
|
||||
- outfile
|
||||
additive: false
|
|
@ -1,2 +1 @@
|
|||
2019-08-20T13:18:17.023781824+02:00 - WARNING, stuff is breaking down
|
||||
2019-08-21T18:50:13.813701633+02:00 - WARNING, stuff is breaking down
|
||||
2019-09-01T12:45:25.256922311+02:00 - WARNING, stuff is breaking down
|
||||
|
|
|
@ -50,7 +50,7 @@ fn log_some_stuff() {
|
|||
error!("ERROR: stopping ...");
|
||||
}
|
||||
|
||||
const USE_CUSTOM: bool = false;
|
||||
const USE_CUSTOM: bool = true;
|
||||
|
||||
fn main() {
|
||||
if USE_CUSTOM {
|
||||
|
|
Plik binarny nie jest wyświetlany.
Plik binarny nie jest wyświetlany.
|
@ -4,9 +4,12 @@ use std::process::{Command, Stdio};
|
|||
|
||||
fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
|
||||
let mut ls_child = Command::new("ls");
|
||||
ls_child.args(&["-alh"]);
|
||||
ls_child.status()?;
|
||||
if !cfg!(target_os = "windows") {
|
||||
ls_child.args(&["-alh"]);
|
||||
}
|
||||
println!("{}", ls_child.status()?);
|
||||
ls_child.current_dir("src/");
|
||||
println!("{}", ls_child.status()?);
|
||||
|
||||
let env_child = Command::new("env")
|
||||
.env("CANARY", "0x5ff")
|
||||
|
@ -14,7 +17,10 @@ fn main() -> Result<(), Box<dyn Error + Send + Sync + 'static>> {
|
|||
.spawn()?;
|
||||
|
||||
let env_output = &env_child.wait_with_output()?;
|
||||
let canary = String::from_utf8_lossy(&env_output.stdout).split_ascii_whitespace().filter(|line| *line == "CANARY=0x5ff").count();
|
||||
let canary = String::from_utf8_lossy(&env_output.stdout)
|
||||
.split_ascii_whitespace()
|
||||
.filter(|line| *line == "CANARY=0x5ff")
|
||||
.count();
|
||||
|
||||
// found it!
|
||||
assert_eq!(canary, 1);
|
||||
|
|
Ładowanie…
Reference in New Issue