The API is just designed to mutate in place, instead of returning the value.
Rust has single ownership. You can't have the same value be in two places (the variable you had, and the returned value). This means sort/dedup can't also return the value for convenience of chaining, because then they would have to only return it, and couldn't let you use the non-chaining syntax, because your original variable would have been moved to the return value.
Method "chaining" is not just some arbitrary syntax made up for putting stuff on one line. Methods are regular functions with all the same typing rules as any other function. If a method doesn't declare returning anything (ie., it has unit return type), then you can't just expect that it will somehow magically return the receiver.
It's possible to write methods that simply return the receiver, but the methods you are calling don't. This could have been inferred from their signature, which you should be able to find yourself in the official documentation.