mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
services/ime-plugin-api: Implement From instead of Into
Signed-off-by: Jean-Pierre De Jesus DIAZ <me@jeandudey.tech>
This commit is contained in:
parent
136aec042b
commit
91e4b9fa15
1 changed files with 5 additions and 5 deletions
|
|
@ -34,16 +34,16 @@ pub struct PredictionTriggers {
|
|||
/// trigger word predictions on whitespace
|
||||
pub whitespace: bool,
|
||||
}
|
||||
impl Into<usize> for PredictionTriggers {
|
||||
fn into(self) -> usize {
|
||||
impl From<PredictionTriggers> for usize {
|
||||
fn from(pt: PredictionTriggers) -> usize {
|
||||
let mut ret: usize = 0;
|
||||
if self.newline {
|
||||
if pt.newline {
|
||||
ret |= 0x1;
|
||||
}
|
||||
if self.punctuation {
|
||||
if pt.punctuation {
|
||||
ret |= 0x2;
|
||||
}
|
||||
if self.whitespace {
|
||||
if pt.whitespace {
|
||||
ret |= 0x4;
|
||||
}
|
||||
ret
|
||||
|
|
|
|||
Loading…
Reference in a new issue