From 0b2f5f0533def11cf38c6b86b7ee6b10aa28123c Mon Sep 17 00:00:00 2001
From: Jonathan Lebon <jonathan@jlebon.com>
Date: Thu, 21 Apr 2022 13:06:20 -0400
Subject: [PATCH] rust/treefile: Fix has_modules_enable() check

We need to check that the set is actually non-empty.
---
 rust/src/treefile.rs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rust/src/treefile.rs b/rust/src/treefile.rs
index dfc8fbc0..884e33f7 100644
--- a/rust/src/treefile.rs
+++ b/rust/src/treefile.rs
@@ -863,7 +863,7 @@ impl Treefile {
         self.parsed
             .modules
             .as_ref()
-            .map(|m| m.enable.is_some())
+            .map(|m| m.enable.as_ref().map(|e| !e.is_empty()).unwrap_or_default())
             .unwrap_or_default()
     }
 
-- 
2.21.0

