We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a9ae87 commit 22c74bdCopy full SHA for 22c74bd
streaming/src/lib.rs
@@ -170,6 +170,17 @@ impl PartialEq for State {
170
}
171
172
173
+impl PartialEq<Target> for State {
174
+ fn eq(&self, other: &Target) -> bool {
175
+ matches!(
176
+ (self, other),
177
+ (State::Closed, Target::Closed)
178
+ | (State::Open { .. }, Target::Open { .. })
179
+ | (State::Streaming { .. }, Target::Streaming { .. })
180
+ )
181
+ }
182
+}
183
+
184
impl fmt::Debug for State {
185
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
186
match self {
0 commit comments