Skip to content

Commit

Permalink
make it a non-breaking change
Browse files Browse the repository at this point in the history
  • Loading branch information
cohix committed Mar 13, 2021
1 parent a8bdcad commit 10b5a98
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions api/rust/suborbital/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -332,17 +332,17 @@ pub mod req {
None => return String::from("")
}
}

pub fn state(key: &str) -> Option<Vec<u8>> {
get_field(FIELD_TYPE_STATE, key)
}

pub fn state_string(key: &str) -> Option<String> {

pub fn state(key: &str) -> Option<String> {
match get_field(FIELD_TYPE_STATE, key) {
Some(bytes) => Some(util::to_string(bytes)),
None => None
}
}

pub fn state_raw(key: &str) -> Option<Vec<u8>> {
get_field(FIELD_TYPE_STATE, key)
}

fn get_field(field_type: i32, key: &str) -> Option<Vec<u8>> {
let mut dest_pointer: *const u8;
Expand Down

0 comments on commit 10b5a98

Please sign in to comment.