Skip to content

Commit

Permalink
Eliminate false-positive dead-code warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
hniksic committed May 15, 2022
1 parent 0f83b05 commit ca3bf09
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/popen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,11 @@ pub struct Popen {
#[derive(Debug)]
enum ChildState {
Preparing, // only during construction
Running { pid: u32, ext: os::ExtChildState },
Running {
pid: u32,
#[allow(dead_code)]
ext: os::ExtChildState,
},
Finished(ExitStatus),
}

Expand Down
1 change: 1 addition & 0 deletions src/posix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ fn os_to_cstring(s: &OsStr) -> Result<CString> {
struct CVec {
// Individual C strings. Each element self.ptrs[i] points to the
// data of self.strings[i].as_bytes_with_nul().as_ptr().
#[allow(dead_code)]
strings: Vec<CString>,

// nullptr-terminated vector of pointers to data inside
Expand Down

0 comments on commit ca3bf09

Please sign in to comment.