You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because the buffer length is never set to anything different than 0 :) assert_eq(buf.len(),0) will be true in your example.
Just setting the capacity does nothing to the length.
Instead of trying "to be smart", just create a slice with the source data
and let the vector extend from it. It automatically sets its capacity and length then.
my code is
but I got
There is nothing writed to filesystem. I can't figure out why
The text was updated successfully, but these errors were encountered: