summary refs log tree commit diff
path: root/tempfile
Commit message (Collapse)AuthorAge
* Reformat with rustfmt from Rust 1.38.0Daniel Verkamp2019-10-17
| | | | | | | | | | | | | | | | This just removes a few extraneous blank lines that the new rustfmt doesn't like. BUG=None TEST=bin/fmt --check Change-Id: I4482f873bdfe19f2f73f86cfdd99d6cce873593c Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosvm/+/1863000 Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Stephen Barber <smbarber@chromium.org> Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* tempfile: Unify the two tempdir implementationsDavid Tolnay2019-07-11
| | | | | | | | | | | | | | | | | | | | | | Looks like we ended up with two totally different tempdir implementations: one from CL:520706 and the other from CL:1409705. This CL consolidates them into one implementation. BUG=chromium:974059 TEST=tempfile: cargo test TEST=crosvm: cargo check --all-features TEST=devices: cargo check --tests TEST=sys_util: cargo check --tests TEST=local kokoro TEST=./build_test Cq-Depend: chromium:1574668 Change-Id: Id70e963c9986ed2fc5f160819c4a7f9f16092b3b Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1573227 Tested-by: kokoro <noreply+kokoro@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
* tempfile: reimplement using libc::mkdtempDaniel Verkamp2019-07-03
| | | | | | | | | | | | | | | | | | POSIX provides a standard mkdtemp() function to securely create a temporary directory; use it rather than reinventing the wheel. This also drops the dependency of tempfile on rand_ish, which will allow easier use of the tempfile implementation outside of crosvm. BUG=chromium:974059 TEST=cargo test -p tempfile Change-Id: I34a226b046dc6f272106988a78d121a24a377f44 Signed-off-by: Daniel Verkamp <dverkamp@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1659971 Tested-by: kokoro <noreply+kokoro@google.com> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Dylan Reid <dgreid@chromium.org>
* edition: Remove extern crate linesDavid Tolnay2019-04-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rust 2018 edition, `extern crate` is no longer required for importing from other crates. Instead of writing: extern crate dep; use dep::Thing; we write: use dep::Thing; In this approach, macros are imported individually from the declaring crate rather than through #[macro_use]. Before: #[macro_use] extern crate sys_util; After: use sys_util::{debug, error}; The only place that `extern crate` continues to be required is in importing the compiler's proc_macro API into a procedural macro crate. This will hopefully be fixed in a future Rust release. extern crate proc_macro; TEST=cargo check TEST=cargo check --all-features TEST=cargo check --target aarch64-unknown-linux-gnu TEST=local kokoro Change-Id: I0b43768c0d81f2a250b1959fb97ba35cbac56293 Reviewed-on: https://chromium-review.googlesource.com/1565302 Commit-Ready: David Tolnay <dtolnay@chromium.org> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: David Tolnay <dtolnay@chromium.org>
* protos: Update to protobuf 2.3David Tolnay2019-04-12
This matches the version already used by crostini_client. The newer protobuf version depends on the tempfile crate rather than tempdir, the latter being now deprecated. So I replaced our immitation tempdir crate with one that matches the API of tempfile instead. As a reminder, we use this crate as a patch to avoid pulling in all of the rand crate and its many dependencies. TEST=cargo check --features plugin CQ-DEPEND=CL:1553971 Change-Id: I28eed3ceadb1013f015400b4c582aaf8dc89eee1 Reviewed-on: https://chromium-review.googlesource.com/1562924 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: David Tolnay <dtolnay@chromium.org> Tested-by: kokoro <noreply+kokoro@google.com> Reviewed-by: Zach Reizner <zachr@chromium.org> Reviewed-by: Daniel Verkamp <dverkamp@chromium.org>