INNER CODE UNIT · Rust
from
lemunozm/ruscii · src/drawing.rs:78
fn from(item: &str) -> Self {
if item.len() < 8 {
panic!("Build a RectCharset requires at least 8 characters.");
}
let mut chars = item.chars();
RectCharset {
top: chars.next().unwrap(),
bottom: chars.next().unwrap(),
left: chars.next().unwrap(),
right: chars.next().unwrap(),
top_left: chars.next().unwrap(),
top_right: chars.next().unwrap(),
bottom_left: chars.next().unwrap(),
bottom_right: chars.next().unwrap(),
}
}
}