Skip to content

SAUL uses deprecated saul_class_to_str function #151

@leandrolanzieri

Description

@leandrolanzieri

During a cleanup of deprecated items in RIOT (RIOT-OS/RIOT#21985), I attempted to remove the deprecated function saul_class_to_str from SAUL. This resulted in the CI pointing out that this crate is using it. I ended up reverting the change because I'm not familiar with the workflow of addressing this changes on the rust code base, nor how to implement name using the non-deprecated variants. I guess the change would require changing the API to receive a buffer?

The usage is here:

/// Human-readable name of the class
pub fn name(self) -> Option<&'static str> {
unsafe { riot_sys::saul_class_to_str(self.to_c()).to_lifetimed_cstr()? }
.to_str()
.ok()
}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions