bump dependencies: github.com/godbus/dbus/v5 to v5.1.0
Signed-off-by: penguin <lihan.zhou@daocloud.io>
This commit is contained in:
14
vendor/github.com/godbus/dbus/v5/dbus.go
generated
vendored
14
vendor/github.com/godbus/dbus/v5/dbus.go
generated
vendored
@@ -122,8 +122,11 @@ func isConvertibleTo(dest, src reflect.Type) bool {
|
||||
case dest.Kind() == reflect.Slice:
|
||||
return src.Kind() == reflect.Slice &&
|
||||
isConvertibleTo(dest.Elem(), src.Elem())
|
||||
case dest.Kind() == reflect.Ptr:
|
||||
dest = dest.Elem()
|
||||
return isConvertibleTo(dest, src)
|
||||
case dest.Kind() == reflect.Struct:
|
||||
return src == interfacesType
|
||||
return src == interfacesType || dest.Kind() == src.Kind()
|
||||
default:
|
||||
return src.ConvertibleTo(dest)
|
||||
}
|
||||
@@ -274,13 +277,8 @@ func storeSliceIntoInterface(dest, src reflect.Value) error {
|
||||
func storeSliceIntoSlice(dest, src reflect.Value) error {
|
||||
if dest.IsNil() || dest.Len() < src.Len() {
|
||||
dest.Set(reflect.MakeSlice(dest.Type(), src.Len(), src.Cap()))
|
||||
}
|
||||
if dest.Len() != src.Len() {
|
||||
return fmt.Errorf(
|
||||
"dbus.Store: type mismatch: "+
|
||||
"slices are different lengths "+
|
||||
"need: %d have: %d",
|
||||
src.Len(), dest.Len())
|
||||
} else if dest.Len() > src.Len() {
|
||||
dest.Set(dest.Slice(0, src.Len()))
|
||||
}
|
||||
for i := 0; i < src.Len(); i++ {
|
||||
err := store(dest.Index(i), getVariantValue(src.Index(i)))
|
||||
|
||||
Reference in New Issue
Block a user