Add initial canary-textwrap crate

This commit is contained in:
mars 2022-12-05 14:44:44 -07:00
parent d62f8f746a
commit feec4de657
3 changed files with 23 additions and 0 deletions

View File

@ -4,6 +4,7 @@ members = [
"apps/music-player",
"apps/sandbox",
"crates/script",
"crates/textwrap",
"scripts/music-player",
"scripts/sao-ui",
]

View File

@ -0,0 +1,8 @@
[package]
name = "canary-textwrap"
version = "0.1.0"
edition = "2021"
[dependencies]
canary-script = { path = "../script" }
textwrap = "0.16"

View File

@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}