Fixed three compile warnings by removing unreachable error handling:
1. Dynamic.discover_sensors/2 always returns {:ok, sensors}, never errors
- Removed unreachable error clause in discovery.ex
- Updated spec to reflect actual return type
2. parse_detection_rule/2 always returns {:ok, :processed}
- Simplified create_detection_rules/2 to use Enum.each instead of reduce_while
- Removed unreachable error handling in caller
3. import_all_from_directory/2 always returns {:ok, %{...}}
- Removed unreachable error clause in Mix task
- Simplified to direct pattern match
All code now compiles without warnings.
|
||
|---|---|---|
| .. | ||
| tasks | ||