File tree Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Expand file tree Collapse file tree 2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,8 @@ This project adheres to [Semantic Versioning](https://semver.org/).
17
17
([ #1959 ] ( https://github.com/nix-rust/nix/pull/1959 ) )
18
18
- Added ` impl std::ops::BitOr for Signal ` .
19
19
([ #1959 ] ( https://github.com/nix-rust/nix/pull/1959 ) )
20
+ - Added ` impl std::ops::BitOr<Signal> for SigSet `
21
+ ([ #1959 ] ( https://github.com/nix-rust/nix/pull/1959 ) )
20
22
21
23
### Changed
22
24
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ use cfg_if::cfg_if;
9
9
use std:: fmt;
10
10
use std:: hash:: { Hash , Hasher } ;
11
11
use std:: mem;
12
+ use std:: ops:: BitOr ;
12
13
#[ cfg( any( target_os = "dragonfly" , target_os = "freebsd" ) ) ]
13
14
use std:: os:: unix:: io:: RawFd ;
14
15
use std:: ptr;
@@ -612,11 +613,9 @@ impl From<Signal> for SigSet {
612
613
}
613
614
}
614
615
615
-
616
- impl std:: ops:: BitOr for Signal {
616
+ impl BitOr for Signal {
617
617
type Output = SigSet ;
618
618
619
- // rhs is the "right-hand side" of the expression `a | b`
620
619
fn bitor( self , rhs: Self ) -> Self :: Output {
621
620
let mut sigset = SigSet :: empty( ) ;
622
621
sigset. add( self ) ;
@@ -625,7 +624,16 @@ impl std::ops::BitOr for Signal {
625
624
}
626
625
}
627
626
628
- impl std:: ops:: BitOr for SigSet {
627
+ impl BitOr <Signal > for SigSet {
628
+ type Output = SigSet ;
629
+
630
+ fn bitor( mut self , rhs: Signal ) -> Self :: Output {
631
+ self . add( rhs) ;
632
+ self
633
+ }
634
+ }
635
+
636
+ impl BitOr for SigSet {
629
637
type Output = Self ;
630
638
631
639
fn bitor( self , rhs: Self ) -> Self :: Output {
You can’t perform that action at this time.
0 commit comments