update relib to be no_std
This commit is contained in:
parent
4d4cdaec3b
commit
9e30c1a3fe
|
@ -1,3 +1,12 @@
|
||||||
|
#![no_std]
|
||||||
|
|
||||||
|
use alloc::{
|
||||||
|
string::{String, ToString},
|
||||||
|
vec::Vec,
|
||||||
|
};
|
||||||
|
|
||||||
|
extern crate alloc;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct Path {
|
pub struct Path {
|
||||||
pub path: Vec<String>,
|
pub path: Vec<String>,
|
||||||
|
@ -5,7 +14,7 @@ pub struct Path {
|
||||||
|
|
||||||
impl Path {
|
impl Path {
|
||||||
pub fn new(path: String) -> Self {
|
pub fn new(path: String) -> Self {
|
||||||
let mut path_vec_string = vec![];
|
let mut path_vec_string = Vec::new();
|
||||||
|
|
||||||
for part in path.split(&['\\', '/'][..]) {
|
for part in path.split(&['\\', '/'][..]) {
|
||||||
path_vec_string.push(part.to_string());
|
path_vec_string.push(part.to_string());
|
||||||
|
|
Loading…
Reference in a new issue