logo

deblob

remove binary executables from a directory git clone https://hacktivis.me/git/deblob.git
commit: 0c932b3103a5cd40019264d8371bc558e254e4f5
parent ce0a9d624520f7e9b5a115ed28b719cea7571c67
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  4 Jun 2022 20:18:19 +0200

favor (error|print)f?ln functions over using \n

Diffstat:

Mmain.ha10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/main.ha b/main.ha @@ -76,7 +76,7 @@ fn check_dir(dirname: str, ignoring: bool) (void | errors::invalid) = { case let iter: *fs::iterator => yield iter; case let err: fs::error => - fmt::errorf("os::iter({}): {}\n", dirname, fs::strerror(err))!; + fmt::errorfln("os::iter({}): {}", dirname, fs::strerror(err))!; return errors::invalid; }; @@ -120,22 +120,22 @@ fn check_dir(dirname: str, ignoring: bool) (void | errors::invalid) = { }; if (ignoring) { - fmt::printf("ignoring: {}\n", filename)!; + fmt::printfln("ignoring: {}", filename)!; continue; }; if (noop) { - fmt::printf("detected: {}\n", filename)!; + fmt::printfln("detected: {}", filename)!; continue; }; - fmt::printf("removing: {}\n", filename)!; + fmt::printfln("removing: {}", filename)!; match (os::remove(filename)) { case void => continue; case let e: fs::error => - fmt::errorf("os::remove({}): {}\n", + fmt::errorfln("os::remove({}): {}", filename, fs::strerror(e))!; }; } else {