Skip to content

Commit 9f0148e

Browse files
committed
Cleanup
1 parent 7913eca commit 9f0148e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

vm/devices/vmbus/vmbus_server/src/channels/saved_state.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -465,13 +465,14 @@ impl VersionInfo {
465465

466466
let feature_flags = FeatureFlags::from(self.feature_flags);
467467
let supported_flags = if version >= Version::Copper {
468+
let mut flags = SUPPORTED_FEATURE_FLAGS.with_confidential_channels(trusted);
468469
// Limit feature flags to those supported by the server's
469470
// compatibility version, if specified.
470-
let max_flags = max_version.map_or(FeatureFlags::from_bits(u32::MAX), |max_version| {
471-
max_version.feature_flags
472-
});
471+
if let Some(max_version) = max_version {
472+
flags &= max_version.feature_flags;
473+
}
473474

474-
SUPPORTED_FEATURE_FLAGS.with_confidential_channels(trusted) & max_flags
475+
flags
475476
} else {
476477
// Earlier protocol versions don't have feature flags.
477478
FeatureFlags::new()

0 commit comments

Comments
 (0)