/
githubmirror
/
rpm-ostree
Обзор
Документация
Войти
/
githubmirror
/
rpm-ostree
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
rust/src/progress.rs
15 строк
388 B
Colin Walters
Add Rust progress task wrapper
16 мар 2021, 17:54
16 мар 2021, 17:54
6eb3caf
Код
Авторство
О чём код?
//! Rust convenience APIs over our rpmostree-output.h //! progress/output APIs. // SPDX-License-Identifier: Apache-2.0 OR MIT /// Call the provided function, while displaying a "task progress" /// message. pub(crate) fn progress_task<F, T>(msg: &str, f: F) -> T where F: FnOnce() -> T, { // Drop will end the task let _task = crate::ffi::progress_begin_task(msg); f() }