Skip to content

Commit 786f65f

Browse files
feat: impl std::ops::BitOr for SigSet
1 parent e4c6ce6 commit 786f65f

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1313

1414
- Added `impl From<Signal> for SigSet`.
1515
([#1959](https://github.com/nix-rust/nix/pull/1959))
16+
- Added `impl std::ops::BitOr for SigSet`.
17+
([#1959](https://github.com/nix-rust/nix/pull/1959))
1618

1719
### Changed
1820

src/sys/signal.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,14 @@ impl From<Signal> for SigSet {
612612
}
613613
}
614614

615+
impl std::ops::BitOr for SigSet {
616+
type Output = Self;
617+
618+
fn bitor(self, rhs: Self) -> Self::Output {
619+
self.iter().chain(rhs.iter()).collect()
620+
}
621+
}
622+
615623
impl AsRef<libc::sigset_t> for SigSet {
616624
fn as_ref(&self) -> &libc::sigset_t {
617625
&self.sigset

0 commit comments

Comments
 (0)