Skip to contentSkip to conversation

bindings: rust: fix documentation of line_request set_values

PATCH Superseded Kent Gibson 2 participants 3 messages Jan 16, 2023 GPIO

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bindings: rust: fix documentation of line_request set_values

Replace "Get" with "Set".

---
 bindings/rust/libgpiod/src/line_request.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bindings/rust/libgpiod/src/line_request.rs +2 -2
index 2816cc1..35f07b3 100644
@@ -106,7 +106,7 @@ impl Request {
         }
     }
 
-    /// Get values of a subset of lines associated with the request.
+    /// Set values of a subset of lines associated with the request.
     pub fn set_values_subset(&self, map: ValueMap) -> Result<()> {
         let mut offsets = Vec::new();
         let mut values = Vec::new();
@@ -136,7 +136,7 @@ impl Request {
         }
     }
 
-    /// Get values of all lines associated with the request.
+    /// Set values of all lines associated with the request.
     pub fn set_values(&self, values: &[Value]) -> Result<()> {
         if values.len() != self.num_lines() {
             return Err(Error::InvalidArguments);
Signature · 1 line
2.39.0
#1 lore raw
Quoted 31 lines · Kent Gibson

Replace "Get" with "Set".

---
 bindings/rust/libgpiod/src/line_request.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bindings/rust/libgpiod/src/line_request.rs +2 -3
index 2816cc1..35f07b3 100644
@@ -106,7 +106,7 @@ impl Request {
         }
     }
 
-    /// Get values of a subset of lines associated with the request.
+    /// Set values of a subset of lines associated with the request.
     pub fn set_values_subset(&self, map: ValueMap) -> Result<()> {
         let mut offsets = Vec::new();
         let mut values = Vec::new();
@@ -136,7 +136,7 @@ impl Request {
         }
     }
 
-    /// Get values of all lines associated with the request.
+    /// Set values of all lines associated with the request.
     pub fn set_values(&self, values: &[Value]) -> Result<()> {
         if values.len() != self.num_lines() {
             return Err(Error::InvalidArguments);
--
Quoted 2 lines

2.39.0

What commit is this patch's parent? It doesn't apply on top of master.

Bart

#2 lore raw
Quoted 26 lines · Bartosz Golaszewski
Quoted 25 lines · Kent Gibson

Replace "Get" with "Set".

---
 bindings/rust/libgpiod/src/line_request.rs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
bindings/rust/libgpiod/src/line_request.rs +1 -1
index 2816cc1..35f07b3 100644
@@ -106,7 +106,7 @@ impl Request {
         }
     }
 
-    /// Get values of a subset of lines associated with the request.
+    /// Set values of a subset of lines associated with the request.
     pub fn set_values_subset(&self, map: ValueMap) -> Result<()> {
         let mut offsets = Vec::new();
         let mut values = Vec::new();
@@ -136,7 +136,7 @@ impl Request {
         }
     }
 
Quoted 11 lines
Quoted 8 lines
bindings/rust/libgpiod/src/line_request.rs +1 -2
-    /// Get values of all lines associated with the request.
+    /// Set values of all lines associated with the request.
     pub fn set_values(&self, values: &[Value]) -> Result<()> {
         if values.len() != self.num_lines() {
             return Err(Error::InvalidArguments);
--

2.39.0

What commit is this patch's parent? It doesn't apply on top of master.

My bad - I've got a commit in there where I was playing with fixing the clippy warnings from rust 1.66 (I suspect they are false positives so haven't submitted a patch).

I'll rebase and resubmit.

Cheers,
Kent.