Thanks to visit codestin.com Credit goes to github.com
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 f3a640b commit 00e969dCopy full SHA for 00e969d
1 file changed
libs/jwst-codec/src/doc/codec/item.rs
@@ -89,14 +89,8 @@ impl Item {
89
90
pub(crate) fn is_valid(&self) -> bool {
91
let has_id = self.left_id.is_some() || self.right_id.is_some();
92
- if self.parent.is_some() && has_id {
93
- return false;
94
- } else if self.parent.is_none() && !has_id {
95
96
- } else if self.parent_sub.is_some() && has_id {
97
98
- }
99
- return true;
+ !has_id && self.parent.is_some()
+ || has_id && self.parent.is_none() && self.parent_sub.is_none()
100
}
101
102
pub(crate) fn write<W: CrdtWriter>(&self, encoder: &mut W) -> JwstCodecResult {
0 commit comments