[pbs-devel] [PATCH proxmox 2/2] section-config: silence clippy

Fabian Grünbichler f.gruenbichler at proxmox.com
Tue Dec 13 14:37:55 CET 2022


these two functions don't actually use the `type_name` parameter, but the
interface including custom formatters require it.

Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
---
 proxmox-section-config/src/lib.rs | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/proxmox-section-config/src/lib.rs b/proxmox-section-config/src/lib.rs
index 51f6770..ed00159 100644
--- a/proxmox-section-config/src/lib.rs
+++ b/proxmox-section-config/src/lib.rs
@@ -577,7 +577,7 @@ impl SectionConfig {
     }
 
     fn default_format_section_content(
-        type_name: &str,
+        _type_name: &str,
         section_id: &str,
         key: &str,
         value: &Value,
@@ -585,7 +585,7 @@ impl SectionConfig {
         if let Value::Array(array) = value {
             let mut list = String::new();
             for item in array {
-                let line = Self::default_format_section_content(type_name, section_id, key, item)?;
+                let line = Self::default_format_section_content(_type_name, section_id, key, item)?;
                 if !line.is_empty() {
                     list.push_str(&line);
                 }
@@ -691,7 +691,7 @@ impl SectionConfig {
     }
 
     fn systemd_format_section_content(
-        type_name: &str,
+        _type_name: &str,
         section_id: &str,
         key: &str,
         value: &Value,
@@ -699,7 +699,7 @@ impl SectionConfig {
         if let Value::Array(array) = value {
             let mut list = String::new();
             for item in array {
-                let line = Self::systemd_format_section_content(type_name, section_id, key, item)?;
+                let line = Self::systemd_format_section_content(_type_name, section_id, key, item)?;
                 if !line.is_empty() {
                     list.push_str(&line);
                 }
-- 
2.30.2






More information about the pbs-devel mailing list