aboutsummaryrefslogtreecommitdiff
path: root/import
diff options
context:
space:
mode:
Diffstat (limited to 'import')
-rw-r--r--import/src/lib.rs16
1 files changed, 10 insertions, 6 deletions
diff --git a/import/src/lib.rs b/import/src/lib.rs
index a6399e9..73f2b91 100644
--- a/import/src/lib.rs
+++ b/import/src/lib.rs
@@ -237,12 +237,16 @@ fn import_traverse(
if let Some(parent) = parent {
node = node.as_object().extend(NO_PARENT, [parent]);
}
- if iflags.hidden {
- node = node.as_object().insert(NO_VISIBILITY, VISI_HIDDEN);
- }
- if iflags.reduced {
- node = node.as_object().insert(NO_VISIBILITY, VISI_REDUCED);
- }
+ node = node.as_object().insert(
+ NO_VISIBILITY,
+ if iflags.hidden {
+ VISI_HIDDEN
+ } else if iflags.reduced {
+ VISI_REDUCED
+ } else {
+ VISI_VISIBLE
+ },
+ );
node
})?;