Log loaned msg error only once
This commit is contained in:
parent
9f7b11da87
commit
8b93894fc5
|
|
@ -3,6 +3,7 @@ use std::ffi::CString;
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
use std::sync::Weak;
|
use std::sync::Weak;
|
||||||
|
use std::sync::Once;
|
||||||
|
|
||||||
use crate::error::*;
|
use crate::error::*;
|
||||||
use crate::msg_types::*;
|
use crate::msg_types::*;
|
||||||
|
|
@ -206,10 +207,12 @@ where
|
||||||
);
|
);
|
||||||
Ok(msg)
|
Ok(msg)
|
||||||
} else {
|
} else {
|
||||||
// TODO: Switch to logging library
|
static LOG_LOANED_ERROR: Once = Once::new();
|
||||||
eprintln!(
|
LOG_LOANED_ERROR.call_once(|| {
|
||||||
"Currently used middleware can't loan messages. Local allocator will be used."
|
// TODO: Switch to logging library
|
||||||
);
|
eprintln!("Currently used middleware can't loan messages. Local allocator will be used.");
|
||||||
|
});
|
||||||
|
|
||||||
Ok(WrappedNativeMsg::<T>::new())
|
Ok(WrappedNativeMsg::<T>::new())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue