gtk-rs-core
gtk-rs-core copied to clipboard
Wrong self convention for `ToValueOptional`, `ToGlibContainerFromSlice`
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> gstreamer/src/miniobject.rs:462:34
|
462 | fn to_value_optional(s: Option<&Self>) -> $crate::glib::Value {
| ^
error: methods with the following characteristics: (`to_*` and `self` type is not `Copy`) usually take `self` by reference
--> gstreamer/src/miniobject.rs:167:40
|
167 | fn to_glib_none_from_slice(t: &'a [$name]) -> (*mut *mut $ffi_name, Self::Storage) {
| ^
CC @GuillaumeGomez @bilelmoussaoui
It seems to me that it is the lint that is wrong
-
to_value_optional(s: Option<&Self>)
is taking&Self
... -
to_glib_none_from_slice
is taking&[]