chiark / gitweb /
Remove an unnecessary drop.
authorSimon Tatham <anakin@pobox.com>
Sat, 30 Dec 2023 09:01:57 +0000 (09:01 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 30 Dec 2023 09:01:57 +0000 (09:01 +0000)
I had imagined that explicitly dropping a reference would terminate a
borrow. But firstly, rustc 1.74 says it does nothing at all, and
secondly, therefore I infer that this particular borrow wasn't in the
way in any case.

src/file.rs

index 68b77658c9dc73ea2e0c11e281a28376e78aa71c..b08e32e186b301a1c11bec6f19ca040ff92a36ca 100644 (file)
@@ -30,7 +30,6 @@ impl FeedFileContents {
         let feed = client.borrow_feed(&self.id);
         let ids: Vec<_> = feed.ids.iter().map(|x| x.clone()).collect();
         self.origin = feed.origin;
-        std::mem::drop(feed);
 
         self.items.clear();
         for id in ids {