aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonas Maier <jonas@x77.dev>2026-05-09 21:47:57 +0200
committerJonas Maier <jonas@x77.dev>2026-05-09 21:47:57 +0200
commit90b34c8cc26d9adf2a1e8ae5169fb6dd0edb01c8 (patch)
treebaa1498775d1f34b709c52821c366378791bc947
parentf467e09038fe675ccd3e2c10b39d94bd5c8e1087 (diff)
downloadpish-90b34c8cc26d9adf2a1e8ae5169fb6dd0edb01c8.tar.gz
get rid of warnings, bump version to 0.6.4
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/lib.rs3
-rw-r--r--src/run/mod.rs12
4 files changed, 5 insertions, 14 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 809bdb3..9acfdfc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -56,7 +56,7 @@ dependencies = [
[[package]]
name = "pish"
-version = "0.6.3"
+version = "0.6.4"
dependencies = [
"libc",
"nix",
diff --git a/Cargo.toml b/Cargo.toml
index 23cc13b..b725ca4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,7 +1,7 @@
[package]
name = "pish"
description = "pretty incredible shell"
-version = "0.6.3"
+version = "0.6.4"
edition = "2024"
license-file = "LICENSE"
diff --git a/src/lib.rs b/src/lib.rs
index 8730b46..700425a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -8,7 +8,7 @@
use std::collections::HashMap;
use std::ffi::OsStr;
use std::fs::{self, File};
-use std::io::{self, BufRead, Read, Write};
+use std::io::{self, Read, Write};
use std::os::unix::ffi::OsStrExt;
use std::os::unix::io::AsRawFd;
use std::path::Path;
@@ -35,7 +35,6 @@ pub mod rw;
pub mod serialization;
pub mod wait;
-use libc::BS0;
use linebuf::LineBuf;
use raw::*;
diff --git a/src/run/mod.rs b/src/run/mod.rs
index a5fd69a..5b2d32d 100644
--- a/src/run/mod.rs
+++ b/src/run/mod.rs
@@ -109,18 +109,10 @@ pub enum SpawnedCmd {
Pipeline(SpawnedPipeline),
}
-trait IsSuccessful {
- fn is_successful(&self) -> bool;
+trait ExecResultAsBool {
fn as_bool(&self) -> Result<bool, ExecError>;
}
-impl IsSuccessful for Result<(), ExecError> {
- fn is_successful(&self) -> bool {
- match self {
- Ok(_) | Err(ExecError::ExecError(0)) => true,
- _ => false,
- }
- }
-
+impl ExecResultAsBool for Result<(), ExecError> {
/// returns the boolean value interpreted from this exit code.
///
/// in case the exit code indicates divergence (break/continue) that "error" will be propagated