title: How to remove the first line of a text file in Rust?
body: <p>I have a <code>./file.txt</code> that is:</p>
  <pre class="lang-none prettyprint-override"><code>Lorem ipsum
  dolor sit
  amet
  </code></pre>
  <p>I want the same <code>./file.txt</code> to be:</p>
  <pre class="lang-none prettyprint-override"><code>dolor sit
  amet
  </code></pre>
  <p>I don't care about the file in any other way; I'm not going to be doing any further manipulation on it or anything like that. I only want to strip the first line.</p>
  <hr />
  <p><code>std::fs::write</code> overrides the entire content of a file. I asssume I would need to read the entire file into a String, remove everything from the start of the string until I find a new line (somehow), then override the entire file with that new string. Though maybe it's just me, all of that feels a bit overkill. I do not care for the entire contents of the file.</p>
  <p>The reason I'm asking is because I simply do not know how to do this, especially so if there's a better way of going about this whole thing. If there is an obvious simple answer that'd be great.</p>
  <p><a href="https://stackoverflow.com/questions/27871299/how-can-i-read-a-file-line-by-line-eliminate-duplicates-then-write-back-to-the">This question</a> was answered for Rust 1.0, which is rather outdated<strike>, to the point where <code>BufReader.lines()</code> no longer exists.</strike></p>