Public Access
fix: format and lint
This commit is contained in:
@@ -85,10 +85,10 @@ fn parse_plugins_config(config: &str) -> Result<Vec<PluginConfig>, Box<dyn std::
|
||||
// Section header [plugins.name]
|
||||
if line.starts_with('[') && line.ends_with(']') {
|
||||
// Save previous plugin if exists
|
||||
if let Some(plugin_data) = current_plugin.take() {
|
||||
if let Some(plugin) = build_plugin_config(¤t_section, plugin_data) {
|
||||
plugins.push(plugin);
|
||||
}
|
||||
if let Some(plugin_data) = current_plugin.take()
|
||||
&& let Some(plugin) = build_plugin_config(¤t_section, plugin_data)
|
||||
{
|
||||
plugins.push(plugin);
|
||||
}
|
||||
|
||||
current_section = line[1..line.len() - 1].to_string();
|
||||
@@ -115,10 +115,10 @@ fn parse_plugins_config(config: &str) -> Result<Vec<PluginConfig>, Box<dyn std::
|
||||
}
|
||||
|
||||
// Don't forget the last plugin
|
||||
if let Some(plugin_data) = current_plugin.take() {
|
||||
if let Some(plugin) = build_plugin_config(¤t_section, plugin_data) {
|
||||
plugins.push(plugin);
|
||||
}
|
||||
if let Some(plugin_data) = current_plugin.take()
|
||||
&& let Some(plugin) = build_plugin_config(¤t_section, plugin_data)
|
||||
{
|
||||
plugins.push(plugin);
|
||||
}
|
||||
|
||||
Ok(plugins)
|
||||
|
||||
Reference in New Issue
Block a user