title: Rust: Convert str to fixed(slices) array of u8
body: <p>I want to convert <code>str</code> to fixed array <code>[u8, 50]</code>, this following code does not work:</p>
  <pre><code>let str = &quot;Hello stackoverflow user!&quot;;
  let array_tmp:[u8; 50] = str.as_bytes();
  </code></pre>
  <p>It cause error: <code>expected array '[u8; 50]', found '&amp;[u8]'</code></p>
  <p>Is there any lib to do that?</p>