Skip to content

Commit

Permalink
remove polonius-the-crab
Browse files Browse the repository at this point in the history
  • Loading branch information
aumetra committed May 2, 2024
1 parent fbab2ba commit dbcd7f4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 39 deletions.
26 changes: 0 additions & 26 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion lib/mrf-tool/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ mrf-manifest = { path = "../mrf-manifest", features = [
"encode",
"serialise",
] }
polonius-the-crab = "0.4.1"
serde_json = "1.0.116"
wasmparser = "0.206.0"

Expand Down
13 changes: 1 addition & 12 deletions lib/mrf-tool/src/fs.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
use polonius_the_crab::{polonius, polonius_return};
use std::{
collections::HashMap,
fs::{self, File},
Expand Down Expand Up @@ -45,17 +44,7 @@ impl Filesystem for DummyFs {

#[inline]
fn create_or_truncate(&mut self, path: &Path) -> io::Result<Self::File<'_>> {
let mut this = self;
// TODO: Remove once we can FINALLY have polonius..
polonius!(|this| -> io::Result<&'polonius mut Vec<u8>> {
if let Some(value) = this.inner.get_mut(path) {
value.clear();
polonius_return!(Ok(value));
}
});

this.inner.insert(path.to_path_buf(), Vec::new());
this.create_or_truncate(path)
Ok(self.inner.entry(path.to_path_buf()).or_default())
}

Check warning on line 48 in lib/mrf-tool/src/fs.rs

View check run for this annotation

Codecov / codecov/patch

lib/mrf-tool/src/fs.rs#L46-L48

Added lines #L46 - L48 were not covered by tests

#[inline]
Expand Down

0 comments on commit dbcd7f4

Please sign in to comment.