mirror of
https://github.com/chatmail/core.git
synced 2026-05-08 17:36:29 +03:00
do not panic when 0 (=failure) is passed to the progress! macro
This commit is contained in:
committed by
holger krekel
parent
83f3e23297
commit
bbb8144129
@@ -18,7 +18,7 @@ use auto_mozilla::moz_autoconfigure;
|
|||||||
macro_rules! progress {
|
macro_rules! progress {
|
||||||
($context:tt, $progress:expr) => {
|
($context:tt, $progress:expr) => {
|
||||||
assert!(
|
assert!(
|
||||||
$progress > 0 && $progress <= 1000,
|
$progress <= 1000,
|
||||||
"value in range 0..1000 expected with: 0=error, 1..999=progress, 1000=success"
|
"value in range 0..1000 expected with: 0=error, 1..999=progress, 1000=success"
|
||||||
);
|
);
|
||||||
$context.call_cb($crate::events::Event::ConfigureProgress($progress));
|
$context.call_cb($crate::events::Event::ConfigureProgress($progress));
|
||||||
|
|||||||
Reference in New Issue
Block a user