mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-06-30 19:09:36 +00:00
fix(wallet_ffi): asref suggestion
This commit is contained in:
parent
fade3b488a
commit
53ae6dcfdd
@ -265,7 +265,7 @@ pub unsafe extern "C" fn wallet_ffi_get_all_labels_for_account(
|
||||
.storage()
|
||||
.labels_for_account(account_id_with_privacy.into())
|
||||
{
|
||||
let Ok(label_c) = CString::from_str(label.inner()) else {
|
||||
let Ok(label_c) = CString::from_str(label.as_ref()) else {
|
||||
print_error(format!("Failed to cast label into C string: {label}"));
|
||||
return LabelList::error(WalletFfiError::InternalError);
|
||||
};
|
||||
|
||||
@ -19,9 +19,10 @@ impl Label {
|
||||
pub fn new(label: impl ToString) -> Self {
|
||||
Self(label.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn inner(&self) -> &str {
|
||||
impl AsRef<str> for Label {
|
||||
fn as_ref(&self) -> &str {
|
||||
&self.0
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user