Skip to content

Conversation

ejm01
Copy link
Contributor

@ejm01 ejm01 commented Mar 28, 2022

Adds a list remove method which takes an object instead of an index.
Related: #7663

@cla-bot cla-bot bot added the cla: yes label Mar 28, 2022
*/
public func remove(_ object: Element) {
guard let index = self.index(of: object) else {
throwRealmException("Object does not exist in List") // ???: Is this too harsh? Should method just return a bool or something?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is an exception much? Should nothing happen if the object isn't present?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants