Remove one pointer too many
This commit is contained in:
parent
e534fc8ec4
commit
6f9ac80c39
1 changed files with 3 additions and 3 deletions
|
@ -139,7 +139,7 @@ func UnmarshalPreprocessed(
|
||||||
// Find an attribute in an ActivityPub object of the given type
|
// Find an attribute in an ActivityPub object of the given type
|
||||||
// Returns a pointer to the found attribute and whether it found it
|
// Returns a pointer to the found attribute and whether it found it
|
||||||
// 2nd parameter is true if the attribute was found, false otherwise
|
// 2nd parameter is true if the attribute was found, false otherwise
|
||||||
func FindAttribute[T BaseApChain](object BaseApChain) (*T, bool) {
|
func FindAttribute[T BaseApChain](object BaseApChain) (T, bool) {
|
||||||
var obj T
|
var obj T
|
||||||
var ok bool
|
var ok bool
|
||||||
// Try and cast object into wanted type
|
// Try and cast object into wanted type
|
||||||
|
@ -150,8 +150,8 @@ func FindAttribute[T BaseApChain](object BaseApChain) (*T, bool) {
|
||||||
object, ok = object.GetSelfOrBase()
|
object, ok = object.GetSelfOrBase()
|
||||||
// If this is the final object in the chain, cancel and return false
|
// If this is the final object in the chain, cancel and return false
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, false
|
return obj, false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return &obj, true
|
return obj, true
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue