On 17-10-22, 19:34, Kent Gibson wrote: > > + pub fn set_prop(&mut self, props: &[SettingVal]) -> Result<()> { > ^ > also &mut Self > > Apart from that, yeah that is what I had in mind, as also noted in my > forthcoming v7 review. Ahh yes. diff --git a/bindings/rust/libgpiod/src/line_settings.rs b/bindings/rust/libgpiod/src/line_settings.rs index be50b5b41c5a..92e8928517f7 100644 --- a/bindings/rust/libgpiod/src/line_settings.rs +++ b/bindings/rust/libgpiod/src/line_settings.rs @@ -70,7 +70,7 @@ impl Settings { } /// Set line prop setting. - pub fn set_prop(&mut self, props: &[SettingVal]) -> Result<()> { + pub fn set_prop(&mut self, props: &[SettingVal]) -> Result<&mut Self> { for property in props { match property { SettingVal::Direction(prop) => self.set_direction(*prop)?, @@ -84,7 +84,7 @@ impl Settings { }; } - Ok(()) + Ok(self) } /// Get the line prop setting. -- viresh