Skip to content

Commit

Permalink
updates
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Oct 17, 2023
1 parent 5e6630e commit d1df76d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 22 deletions.
17 changes: 17 additions & 0 deletions library/std/src/sys/postgres/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ pub fn current_exe() -> io::Result<PathBuf> {

pub struct Env(!);

impl Env {
// FIXME(https://github.com/rust-lang/rust/issues/114583): Remove this when <OsStr as Debug>::fmt matches <str as Debug>::fmt.
#[inline]
pub(crate) fn str_debug(&self) -> impl fmt::Debug + '_ {
let Self(inner) = self;
match *inner {}
}
}

impl fmt::Debug for Env {
#[inline]
fn fmt(&self, _: &mut fmt::Formatter<'_>) -> fmt::Result {
let Self(inner) = self;
match *inner {}
}
}

impl Iterator for Env {
type Item = (OsString, OsString);
fn next(&mut self) -> Option<(OsString, OsString)> {
Expand Down
24 changes: 2 additions & 22 deletions library/std/src/sys/postgres/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -308,22 +308,6 @@ impl fmt::Debug for Command {
}
}

impl Clone for ExitStatus {
fn clone(&self) -> ExitStatus {
*self
}
}

impl Copy for ExitStatus {}

impl PartialEq for ExitStatus {
fn eq(&self, other: &ExitStatus) -> bool {
self.0 == other.0
}
}

impl Eq for ExitStatus {}

#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub struct ExitStatusError(ExitStatus);

Expand Down Expand Up @@ -386,13 +370,9 @@ impl<'a> fmt::Debug for CommandArgs<'a> {
f.debug_list().finish()
}
}
pub struct ExitStatus(c_int);

impl fmt::Debug for ExitStatus {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
f.debug_tuple("unix_wait_status").field(&self.0).finish()
}
}
#[derive(PartialEq, Eq, Clone, Copy, Debug, Default)]
pub struct ExitStatus(c_int);

impl ExitStatus {
pub fn new(status: c_int) -> ExitStatus {
Expand Down

0 comments on commit d1df76d

Please sign in to comment.