projects
/
ldk-c-bindings
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Replace type resolution assertions with failures
[ldk-c-bindings]
/
lightning-c-bindings
/
src
/
lightning
/
util
/
logger.rs
diff --git
a/lightning-c-bindings/src/lightning/util/logger.rs
b/lightning-c-bindings/src/lightning/util/logger.rs
index 411a34fd8634fc492a52267caf3bd9cd4587aa74..1e4051d05dc3a28eda4290cf71517c0a251508cf 100644
(file)
--- a/
lightning-c-bindings/src/lightning/util/logger.rs
+++ b/
lightning-c-bindings/src/lightning/util/logger.rs
@@
-22,8
+22,8
@@
use crate::c_types::*;
use alloc::{vec::Vec, boxed::Box};
/// An enum representing the available verbosity levels of the logger.
use alloc::{vec::Vec, boxed::Box};
/// An enum representing the available verbosity levels of the logger.
-#[must_use]
#[derive(Clone)]
#[derive(Clone)]
+#[must_use]
#[repr(C)]
pub enum Level {
/// Designates extremely verbose information, including gossip-induced messages
#[repr(C)]
pub enum Level {
/// Designates extremely verbose information, including gossip-induced messages
@@
-39,7
+39,9
@@
pub enum Level {
/// Designates very serious errors
Error,
}
/// Designates very serious errors
Error,
}
-use lightning::util::logger::Level as nativeLevel;
+use lightning::util::logger::Level as LevelImport;
+pub(crate) type nativeLevel = LevelImport;
+
impl Level {
#[allow(unused)]
pub(crate) fn to_native(&self) -> nativeLevel {
impl Level {
#[allow(unused)]
pub(crate) fn to_native(&self) -> nativeLevel {
@@
-172,7
+174,7
@@
pub extern "C" fn Record_free(this_obj: Record) { }
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
pub(crate) extern "C" fn Record_free_void(this_ptr: *mut c_void) {
#[allow(unused)]
/// Used only if an object of this type is returned as a trait impl by a method
pub(crate) extern "C" fn Record_free_void(this_ptr: *mut c_void) {
- unsafe { let _ = Box::from_raw(this_ptr as *mut nativeRecord); }
+ let _ = unsafe { Box::from_raw(this_ptr as *mut nativeRecord) };
}
#[allow(unused)]
impl Record {
}
#[allow(unused)]
impl Record {