]> khamidou — GitHub mirrors - safetensors.git/commitdiff
Adding cargo audit check. (#64)
authorNicolas Patry <patry.nicolas@protonmail.com>
Tue, 8 Nov 2022 14:47:22 +0000 (15:47 +0100)
committerGitHub <noreply@github.com>
Tue, 8 Nov 2022 14:47:22 +0000 (15:47 +0100)
* Adding cargo audit check.

* Update command line.

* Update affected crates.

.github/workflows/python.yml
.github/workflows/rust.yml
bindings/python/Cargo.toml
bindings/python/src/lib.rs
safetensors/Cargo.toml

index b4d19a17e88a6389d54425d56543436efd254b1c..b2c2ba2535786e9085b75ef27c4ed451964c29ec 100644 (file)
@@ -50,6 +50,12 @@ jobs:
           command: clippy
           args: --manifest-path ./bindings/python/Cargo.toml --all-targets --all-features -- -D warnings
 
+      - name: Run Audit
+        uses: actions-rs/cargo@v1
+        with:
+          command: audit
+          args: -D warnings -f ./bindings/python/Cargo.lock
+
       - name: Install
         working-directory: ./bindings/python
         run: |
index c394b8eefaaea0428836df049429c077131188b6..9a79a2960f88acba661b4674ee4c8e0345240864 100644 (file)
@@ -45,6 +45,12 @@ jobs:
           command: test
           args: --verbose --manifest-path ./safetensors/Cargo.toml
 
+      - name: Run Audit
+        uses: actions-rs/cargo@v1
+        with:
+          command: audit
+          args: -D warnings -f ./safetensors/Cargo.lock
+
       # Verify that Readme.md is up to date.
       - name: Make sure, Readme generated from lib.rs matches actual Readme
         if: matrix.os == 'ubuntu-latest'
index 79fdbedfb07a730e10967b006e7c4a7cd0966409..d9e5e75c7219a3db4c6821b58476ca53ee07a4ab 100644 (file)
@@ -10,7 +10,7 @@ crate-type = ["cdylib"]
 
 [dependencies]
 pyo3 = { version = "0.17.2", features = ["extension-module"] }
-memmap = "0.7"
+memmap2 = "0.5"
 serde_json = "1.0"
 libloading = "0.7"
 
index df869e0a56245ed8d9f5fc0421f27597694c6263..b5f40fbb87579c9d7036a639e36954ee3b01f5e8 100644 (file)
@@ -1,7 +1,7 @@
 #![deny(missing_docs)]
 //! Dummy doc
 use libloading::{Library, Symbol};
-use memmap::{Mmap, MmapOptions};
+use memmap2::{Mmap, MmapOptions};
 use pyo3::exceptions;
 use pyo3::once_cell::GILOnceCell;
 use pyo3::prelude::*;
index a3da6d9cd9630ce57fcb63167525cd4ccab47c07..e1ce008462f5dc11239d4059933480c540223378 100644 (file)
@@ -10,7 +10,7 @@ serde = {version = "1.0", features = ["derive"]}
 serde_json = "1.0"
 
 [dev-dependencies]
-criterion = "0.3"
+criterion = "0.4"
 
 [[bench]]
 name = "benchmark"