Ah! This is good, feels much better, because we don't use data later on we can give ownership away. I also should have read the WebForm doc, into_inner() really simplified things.
Thank you! I'll add a note to take a look at this comment.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Pretty sure the answer here is to actually do what the method name implies, make a
NewPost
from thePostForm
:Since you don't need the
Form<PostForm>
, there's no need to clone anything, just pass ownership of the entire object.Ah! This is good, feels much better, because we don't use data later on we can give ownership away. I also should have read the WebForm doc, into_inner() really simplified things.
Thank you! I'll add a note to take a look at this comment.