summaryrefslogtreecommitdiff
path: root/rust/kernel/lib.rs
diff options
context:
space:
mode:
authorWedson Almeida Filho <wedsonaf@gmail.com>2023-01-30 03:44:00 -0300
committerMiguel Ojeda <ojeda@kernel.org>2023-02-01 00:14:01 +0100
commit4d4692a2ff836487c17960a6211a4cce7094f09c (patch)
tree1e4d1feb8d391448da47343301d8f8a83674cacf /rust/kernel/lib.rs
parentdec1df547d812a5ced4de29e7eadcfa0484bec1e (diff)
downloadlinux-4d4692a2ff836487c17960a6211a4cce7094f09c.tar.gz
linux-4d4692a2ff836487c17960a6211a4cce7094f09c.tar.bz2
linux-4d4692a2ff836487c17960a6211a4cce7094f09c.zip
rust: types: introduce `ScopeGuard`
This allows us to run some code when the guard is dropped (e.g., implicitly when it goes out of scope). We can also prevent the guard from running by calling its `dismiss()` method. Signed-off-by: Wedson Almeida Filho <wedsonaf@gmail.com> Reviewed-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com> Reviewed-by: Andreas Hindborg <a.hindborg@samsung.com> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'rust/kernel/lib.rs')
0 files changed, 0 insertions, 0 deletions