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