dsalgo 0.3.7

A package for Datastructures and Algorithms.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
pub fn str_to_byte_vec(s: &str) -> Vec<u8> { s.bytes().collect::<Vec<_>>() }
#[cfg(test)]
mod tests {
    #[test]
    fn test() {
        use super::*;
        let s = "abc";
        assert_eq!(
            str_to_byte_vec(s),
            vec![b'a', b'b', b'c'],
        );
    }
}